« first day (883 days earlier)      last day (4058 days later) » 

sbi
12:08 PM
Can someone please explain function overloading to me in half a dozen slides? :-/
 
hmm
 
Half a dozen slides? One class declaration with some overloaded methods with different signatures should do, no?
 
allows you to define several methods with the same name, the compiler figures out which one you meant based on the types of the arguments
 
sbi
@MartinJames Oh, but classes only come later.
 
@DeadMG yeah - what's sbi gonna do with the other five slides?
 
12:13 PM
dunno :P
try describing the overload resolution algorithm a bit
 
Xeo
@sbi Wait, who are you teaching exactly? And what do they know?
Also, morning
 
sbi
@DeadMG And why, given void my_print(const std::string& s), would my_print("Hello, world!") call this, "Hello, world!" is of type char[], and not std:.string?
@Xeo Programmers. Three of them, as it seems. I was informed they do embedded C. One of them claims to have some hazy idea about C++.
 
@sbi Oh dear...
 
sbi
@MartinJames It's more like "How the hell am I supposed to explain this in only half a dozen slides?"
 
Xeo
@sbi Hmm...
 
12:15 PM
that's really a bit broad
I mean, that stuff is general type system knowledge- what is the real type of "hello" as opposed to std::string, etc.
 
Xeo
STL's Core C++ 3 video is about overload resolution - that might give you some inspiration.
@sbi Btw, it's char const[N]
 
sbi
@Xeo Is it? Or isn't it an rvalue of char[], which can be captured by a const char[]?
I have some vague recollection of this being more complicated than I thought. Or was it that I thought this more complicated than it was? Well, either way, it was complicated... Sheepish Grin.
 
@sbi Nope. No rvalues of array type, ever.
it's an lvalue of type const char[N], where N is the appropriate size.
 
sbi
@Xeo No time for that. I am half way through my teaching concept paper, have about 150-200 slides, and start teaching tomorrow.
@DeadMG Ah, so arrays are an exception? What about 42? Is that an int rvalue or is it a const int?
 
yeah, arrays are the exception
 
sbi
12:20 PM
Oh dear, exceptions, too, are still on my list...
 
Xeo
@DeadMG Wrong
 
@DeadMG 42 is a prvalue and the type is int
 
Xeo
It's just string literals that are specified to be an lvalue of type char const[N].
 
but when you do lvalue-to-rvalue decay, you don't get back an array, you get back a pointer.
show one sample code that produces an rvalue array.
 
Xeo
No, that is array-to-pointer decay-
 
sbi
12:21 PM
@Xeo So strings are the exceptions, then, huh?
 
@sbi You are going to teach overload resolution before classes and exceptions?
 
sbi
Did I mention I remembered this to be complicated?
@MartinJames How can you teach classes without them knowing about overloading?
And the problem with exceptions is that you can't really teach much about it unless you have polymorphism covered.
 
hmm
 
@sbi Well, IMHO, the egg came first, then the chicken.
 
Ups replied to wrong message
 
12:22 PM
I'm not so sure about that.
 
¬_¬ you do not need either to teach either. Sure they go well together, but you do not have to know them both to know them both
 
the only case where exceptions and polymorphism go together is when catching multiple types which are related by inheritance
which, IYAM, is not a major feature of exceptions at all.
 
sbi
@MartinJames Of course, given that polymorphism without dynamic allocation doesn't make much sense, and that new might throw...
 
Oh my god that hangover :<
 
12:23 PM
studying exceptions is more about exception safety, rather than exception hierarchies.
 
Xeo
@sbi Don't let them worry about new throwing.
 
@sbi 42 is a prvalue and the type is int. For string literals, the type is char const[], but the result of decltype("literal") is char const (&)[8]
 
also
OMG
> You've earned the "Fanatic" badge. See your profile.
Bartek Banachewicz, GdaƄsk, Poland
5.3k 1 7 33
 
Xeo
If you've reached that point, you're fucked anyways in the normal case.
 
<3 <3 <3
 
12:24 PM
@BartekBanachewicz Hehe! I am totally recovered. No headache, no gutache. Time to start drinking again:)
 
sbi
@AndyProwl I saw that, thought so, but decided to ignore the almost combinatoric explosion of value types, because that's C++11, and we're talking embedded stuff here.
 
@sbi I see
 
@sbi Yeah, you're not using a C++11 compiler, right?
 
sbi
@Xeo It's not about worrying, it's about teaching them not to check for NULL after new. These are C programmers, remember?
 
@sbi poor fellas
 
sbi
12:25 PM
@DeadMG Actually >I was told they're gonna have VC2010 on their machines.
@DeadMG You do need to be taught exception hierarchies, too, though.
 
Xeo
@sbi True.
 
@DeadMG On embedded, they probably don't have a wide choice of the latest compilers :( If you're lucky, they may be able to use some subset of the standard library. Exceptions may not be supported at all on some targets.
 
@sbi but that sits on top of basic exception concepts
 
Xeo
Anyways, for overloading: Pick some C function that is "overloaded" C-style with different names, and transform it into a C++ overload set. Have two snippets with one being C, the other C++, and calling those functions with the same arguments. Overloading will, most of the time, yield an intuitive result.
 
@BartekBanachewicz I just got Fanatic also :D :D
 
12:28 PM
@sbi True, but I'd really cover that later.
 
Xeo
And when you come to "string literal vs std::string", remind them of implicit conversions from, say, int to long and all that.
 
@sbi Oh, I see. In which case, the C++11 lvalue/rvalue and rvalue references stuff really is essential to teach.
 
sbi
@thecoshman Exception safety is a concept that requires you to know about the basic mechanics of exception. And that exceptions can be polymorphic is a part of the basic mechanics.
 
@Doorknob mawning Doorknob. You're looking particularly well-polished today.
2
 
haha thanks @Martin :)
 
sbi
12:29 PM
@DeadMG Nope. We'll skip over that.
 
I am ready to be turned!
and to open doors :P
 
@sbi I disagree. Whether or not the exception is polymorphic is irrelevant to when exceptions might occur, and the damage that is done if you're not exception-safe, and the techniques used to achieve exception-safety.
 
sbi
@Xeo Yeah, I agree. Please point out a well-known example of C-style "overloading" that can be used for such a teaching.
 
@sbi you can't teach everything at once. So simple things like just how to wrap a 'new' in a try/catch to check to handle out of memory issues can be taught. At a later stage, you can introduce how they can do their own exception stuff
 
@MartinJames it's Dorknoob
 
12:31 PM
@sbi printf might be a good start.
 
Xeo
@sbi Any <math.h> function, really.
 
-3
Q: Feature Request: Require a reason when downvoting

BrandonDownvoting an answer is supposed to be reserved for answers that are sloppy, have errors, etc: http://stackoverflow.com/privileges/vote-down Downvoting does cost the voter one reputation point, but I don't feel that's enough of a deterrent for people who downvote maliciously. Take for example th...

lol
 
@Doorknob H5
 
@BartekBanachewicz You might say that. I could not possibly comment..
 
oh yeah, misspellings of "doorknob" are funny :P
 
12:33 PM
@Doorknob Yeah - can't see that going down well, 'The OP is obviously a total moron'.
 
sbi
@Xeo Which ones are there? I vaguely remember some having an f-prefixed pendant for float. Can you name some?
@DeadMG How's that overloaded?
 
Xeo
@sbi fprintf, vfprintf
 
@sbi so erm, how have you ended up teaching people C++?
 
Xeo
I don't think it's a particularly good example, though
 
@thecoshman You wanna sign up for his class?
 
Xeo
12:35 PM
 
@MartinJames not sure... might like to look over the material though. Never hurts to make sure you know shit
 
Xeo
I'd probably go with abs or div.
 
sbi
@DeadMG The problem with exception safety is also that you need to know about classes, ctors, and dtors, before you can explain RAII.
 
Xeo
abs, labs, llabs, fabs
 
@thecoshman Certainly in my case, yes :((
 
Xeo
12:36 PM
You'd have to check how exactly their C-variants look like
Since C++ adds overloads to those.
 
also, what the hell were y'all doing on mumble yesterday
 
Xeo
@sbi: Found the C page: en.cppreference.com/w/c/numeric/math
 
sbi
@thecoshman My approach is to briefly touch some area, explain the truth, and nothing but the truth, but not the whole truth. Then I take the knowledge acquired there to teach (parts of) another subject, and so on, until I come back to one previously visited where I then reveal as much of the so far skipped-over truth as they can stomach.
When I think about it in my head this resembles a spiral staircase in a tower. You go up and keep seeing the same landscape through the windows, but your increasing height gives you a better overview each time you look at the same angle of the landscape.
 
@BartekBanachewicz chatting I presume
 
This is not a StackOverflow question is it:
0
Q: Tutorial: Porting Qt4 to Qt5

RobistonThis tutorial is intended to help out for some issues that could occur when port from Qt4 to Qt5. I came in some trouble while moving my applications to Qt5, so I would like to share with you my experience. Let's ask the general question: How to move your GUI and code from Qt4 to Qt5?

 
Xeo
12:39 PM
So yeah, abs (int), labs(long), llabs(long long), imaxabs(intmax_t), fabs(float)
 
@thecoshman tis weird shit
 
sbi
@Xeo Thanks. That's indeed a very good example!
 
imaxabs. Wow.
 
@sbi well, C++ is so vast, you are basically going to have to fall back 'just take this as a given for now'
 
Xeo
You might even go the route long abs(long l){ return labs(l); }, aka implementing them in terms of their C counterpart (so as not having to deal with how they should be implemented)
Hmm... Do they learn of namespaces before that?
 
12:41 PM
@Xeo that's so goddamn retarded
 
Xeo
@BartekBanachewicz It's C, what did you expect.
 
sbi
@Xeo And does C++ overload std::abs() to work with all of those types?
 
snfprintfhelpImtrappedinC
 
Xeo
@sbi Yes
 
@sbi yes, but not the float overloads aren't in the same header as the float ones.
 
Xeo
12:42 PM
(And also the float abs(float) variant)
 
@Bartek print(" ");sql("DROP TABLE Students;");print(" ") :P
 
GCC 4.8 has branched.
 
Xeo
@rubenvb Yeah, int ones are in <cstdlib>, float ones in <cmath>
 
@rubenvb wat
 
12:45 PM
@BartekBanachewicz yes, there is a GCC-4_8-branch now.
Release is imminent I guess.
 
sbi
@rubenvb Yeah, but I won't worry about such trivialities as which header you need to include. In C++, all of those are std::abs(), and that#s what counts. /cc @Xeo
@Xeo Thanks, you're a star!
 
Xeo
np
 
@sbi not really, if the int overloads are in scope, and you call them with a float, you get truncation.
 
Xeo
no wait
Nope, they're not
 
Xeo
12:47 PM
@sbi int-family ones are still in <cstdlib>, and float-family is in <cmath>
@rubenvb Bad link?
 
mawning
 
sbi
@rubenvb Yeah, that's one of the perils of overloading in conjunction with implicit type conversion. I am going to cover that when I introduce user-defined conversions.
 
@Xeo moved to coliru.
@sbi It gives an overload ambiguity error, but I'm not sure it's not specific to libstdc++ or not...
 
Xeo
@rubenvb Should be standard-conforming
 
sbi
@rubenvb Oh, in this case it might. In other cases it will silently calling the wrong function, making the nuclear power plant blow up.
 
Xeo
12:50 PM
Since float is equally well convertible to any of the int types.
 
stupid conversions.
 
Xeo
Btw @sbi, when you come back later to overloading, after you have had classes, you might wanna do another example with "literal" and std::string
And tell them that classes, through their constructors, can have implicit conversions aswell
(But don't tell them about conversion operators. :P)
 
sbi
@Xeo "I am going to cover that when I introduce user-defined conversions."
 
Xeo
@sbi Oh, sorry, overlooked that.
 
sbi
@Xeo Of course I'm gonna tell them about that one. I have to tell them everything. They might run across it in some code, after all. I will, however, not elaborate on it, and tell them to not to do that.
@Xeo Happens to me all the time... :-/
 
Xeo
12:54 PM
heh
 
One day, we will have the option to turn off all implicit conversions, (please!).
 
user1357851
no conversion is implicit in C++
 
Xeo
// pop-quiz: With `f("hi")`, which of the following overloads is chosen:
void f(char const (&arr)[3]);
void f(char const* str);
 
sbi
Well, I think once I have covered polymorphism including MI, I can then introduce them to the beauty of C++' input/output library.
 
@Xeo murkdwn fail
 
Xeo
12:56 PM
> beauty
@rubenvb not really.
It's all monospace
 
sbi
@Xeo My tongue just painfully popped through my cheek.
 
Xeo
heh
 
Anyone here made anything using both Code Igniter and Laravel?
 
Anyone else have no idea what those two things are :O
 
@Xeo the first one, of course.
 
Xeo
12:58 PM
Any other picks?
 
@Doorknob Well, I assumed they were techno-thriller titles.
 
Lol
 
hm... however I'm not sure about [3].
 
Xeo
@Abyx Don't worry, "hi" is char const[3]
 
@MartinJames Lol... They're PHP frameworks. No one ever worked with php?
 
1:00 PM
I don't use PHP
 
Xeo
@GamesBrainiac Wrong room?
 
if it would be template<size_t N> ... [N] it definitely will be chosen over const char*.
 
there's a PHP room
 
@Xeo I know.
 
1:00 PM
fuck bad link again
 
@Xeo Hey, this place has everything. Its not just C++
 
Xeo
@rubenvb Aaaand, that defeats the whole purpose of the pop-quiz.
You were supposed to think, not rely on what a single compiler tells you.
 
So, I just asked.
 
(although the PHP room is littered with and )
 
@Xeo when in doubt, ask a compiler.
 
sbi
1:01 PM
@rubenvb The last time I relied on this (a few years ago, I admit), every fucking compiler (version) this had to run with did something else. I ended up with a lot of #ifdef warts that took years to clean out.
 
When still in doubt, ask another compiler.
@sbi never resort to ifdef'ing compiler versions.
 
user1357851
compliers tend to collude
 
That's just gross.
 
user1182183
Hm guys did I overload this correctly? I want to send a byte array over a network, and well this is kinda how I send/receive it: ideone.com/XDIcJW , but somehow it doesn't.. work, I'm using CSimpleSocket library
 
Xeo
sigh oh well. Answer is: it's ambiguous, yes. And @Abyx, with the template, the char const* one is chosen.
 
sbi
1:02 PM
@rubenvb Yeah, so we thought, too. Yet, it was that or scrap the feature it was needed for. What do you think we did?
 
@sbi spend a lot of time cleaning out the mess later ;-)
 
sbi
Anyway, I do need to concentrate on my slides now, and you guys keep plinking me. Off he goes...
 
@Xeo uhm... that was a weird question anyway. who would use such overloads?
@sbi you can mute sound.
 
Xeo
It was a pop-quiz, not a practical snippet of code.
Nobody would do that, obviously.
But people will try the template vs char const* and be surprised.
 
I find it weird though.
I'd think a non-conversion would take preference.
 
1:05 PM
@Xeo unit-tests ftw.
 
@FredOverflow: Hiya! :D Don't see you much these days? Too many classes?
 
Xeo
@rubenvb Both are non-conversions, according to standard. :)
Well, kinda, anyways.
 
lol.
 
Xeo
"hi" -> char const(&)[3] is identity conversion
 
Exactly my point. The type of a string literal is not char const* yet there's no conversion involved.
@Xeo not true, you lose length information.
 
1:06 PM
@GamesBrainiac Dunno, just not too chatty these last few weeks.
 
Xeo
@rubenvb Huh?
 
Or did you mean classes in the OO sense? ;-)
 
@Xeo give me a sec
 
Xeo
"hi" -> char const* is array-to-pointer conversion
However, standard says that for comparing implicit conversion sequences, lvalue transformations are to be ignored (and array-to-pointer decay is an lvalue transformation)
So, both overloads require an ICS of just [identity] and are ambiguous.
 
@FredOverflow How are your students?
And also, do you know a good tutorial on how to create a RDP?
 
1:08 PM
Hi guys.
 
@coolguyxp dat nick o.O hi
 
Is a n00b question alright?
 
um
 
@GamesBrainiac A handful of them have an exam next week, the rest is done. Well, with the C++ course :) After that, I won't see them anymore.
 
maybe...?
 
1:10 PM
@Xeo hmm, okay.
I had a stupid example in mind, so never mind.
 
I'm jsut starting
 
@FredOverflow Thats awesome. So yea, know a good book where I can learn how to make a RDP?
I showed Dead a website, but he didn't like it and said it wasn't good.
So yea..
 
@coolguyxp dude. Please use english.
 
I have a char [100] that I'm trying to assign to another char[100], but I get error: '=': left operand must be l-value
 
That error message is quite clear...
 
1:12 PM
@coolguyxp you can't assign a C-style array. Use std::array, std::string or std::vector.
 
@GamesBrainiac What is an RDP?
 
@FredOverflow A recursive Descent Parser
 
@coolguyxp strcpy in C, std::string in C++.
@GamesBrainiac How about the Dragon book?
 
@Griwes oh really? Please tell me how many beginners know about l-values...
 
@FredOverflow Thanks a bunch.
 
1:13 PM
Whats that?
@FredOverflow The dragon book?
 
The Dragon Book may refer to: * Principles of Compiler Design (1977, the "Green Dragon Book"), by Alfred V. Aho and Jeffrey D. Ullman * ' (1986, the "Red Dragon Book"), by Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman * ' (2006, the "Purple Dragon Book"), by Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman and Monica S. Lam * The Dragon Book of Verse, compiled under the aegis of the Dragon School
 
-9
Q: FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK

user2178010FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FU...

Not constructive?
 
lol
 
@AndyProwl I think he made a big construction! :P
 
1:15 PM
why not?
 
@FredOverflow Looks intimidating.
 
@GamesBrainiac What a shame, it's deleted already
 
@AndyProwl note the tags, lol
 
times like this is why I want 10k
XD
 
@FredOverflow lol, yes very much on topic
 
1:16 PM
Seems like had some trouble with XML in C++.
 
@Griwes I must disagree, sorry. l/r/x/p-values are an advanced subject, that comes way after classes/overloads/templates. Sure you'll be hit by them while learning other stuff, but the details aren't that important.
 
@FredOverflow The OP also added a comment repeating pretty much the same information
 
I know, I saw.
 
@FredOverflow : I am going to try reading it though.
 
@rubenvb Finding how to assign an array in C++ is ever easier than finding information on lvalues.
 
1:17 PM
someone send a screenshot of the deleted question please :P
 
Finding information is the most important programming skill, you know.
 
Are you having trouble with XML in C++? :) — FredOverflow 14 secs ago
 
@Griwes you're a stuck up person, aren't you? Have you looked at the average SO question yet?
 
this is my new query to find questions I can answer
also @Griwes @rubenvb that escalated quickly :O
 
@rubenvb lol
@Doorknob Huh? You are new to the interwebz, aren't you?
 
1:23 PM
@Griwes Lol, but in the other rooms this isn't as common :P
 
Lol, teen drama started the "Real" C++ Room:
in (Not the) <Real> C++ Room, yesterday, by CC Inc
Thanks. Let's make this happen.
in (Not the) <Real> C++ Room, yesterday, by JABFreeware
@CCInc yeah. The other room "C++ Lounge" no offense to them, but you never get anything except insults from them
 
^ what I thought when I first found this room :P
 
in (Not the) <Real> C++ Room, 8 secs ago, by FredOverflow
This room needs more templates.
 
@BartekBanachewicz, SFML continues to not work.
 
@AndyProwl I don't see why :)
 
1:28 PM
@sehe What are you referring to?
 
@AndyProwl I'm literally replying to your message. So, yeah, I was referring to that
(by the way, hover mouse to see reply chains, click the 'followup' arrow to go there etc.)
All this is in the newbie hints :0 (I hope)
 
@sehe it is.
it's just that nobody reads them.
 
@sehe I hovered the mouse but no message was highlighted
And yes I am quite a newbie
 
@AndyProwl So, that's when the arrow comes in handy :)
No problem.
 
1:31 PM
@sehe Got it, thanks :)
 
I need to be working hard, so I'm going to be away from chat :)
 
Does "r" mean anything as a hresult?
I must be doing something wrong
fprintf(filea,"Result: %r\n", hr);
where hr is a hresult
 
user142019
@coolguyxp RTFM
 
I don't think that the Linux manual specifies anything to do with HRESULTs
 
I did..
 
user142019
1:37 PM
Why are you using fprintf anyway.
 
That's what was included in the example source code
 
I need to convert a date of given format in given type to three ints, I'm sure this can be made simpler, right?
 
user142019
@TonyTheLion prolly with the modulo operator.
 
Morning
 
user142019
Hello Cat.
 
user142019
1:41 PM
Hurray. Monadic IRBuilder wrapper works.
 
user142019
runIRBuilder ctx $ do
    positionBuilderAtEnd entry
    tmp1 <- buildMul a b "tmp1"
    tmp2 <- buildAdd tmp2 c "tmp2"
    buildRet tmp2
 
When doing SFINAE on a function template, if substitution yields a simple substitution failure for the return type and a hard compilation error for a function parameter type (e.g. substitution failure in a non-immediate context), can I assume anything about whether an error or a substitution failure will eventually occur? In other words, is there any guarantee that the return type will be substituted before the argument type, or vice versa?
Maybe @Xeo can help?
:)
 
Xeo
@AndyProwl I think left-to-right order is imposed somewhere for evaluation (like enable_if<has_foo<T> && access_foo<T>>), but I have no idea if that applies to the signature as a whole.
 
@Xeo All right, thank you
 
Xeo
Best not rely on it.
 
1:47 PM
@Xeo I'll ask on SO, thank you
I just gave an answer which I realized relies on the fact that return type is substituted before parameter types. It seems to work on all compilers, but I was not sure if the order is guaranteed by the standard
 
@TonyTheLion
int x = 130115;
int yy = x/10000;
int dd = x % 100;
int mm = x/100 % 100;
 
@melak47 Simple enough :)
 
user1357851
A philosophical question: if you date the one down below, are you date two people or just one person?
 
user1357851
 
@Telkitty depends if they both like you? idk man.
 
user1357851
1:57 PM
If they are both friendly towards you and you take them on a date (you have to because they are conjoined)
 
@Telkitty I suppose it would be best to ask them, not us :p
I said ask them, not ask them out :p they probably have figured this out already I imagine :p
 
@Pawnguy7 what. how. I sent you the working binaries.
what's wrong
 
ITT: Telkitty doesn't understand why people hate his image spam, then spams another worthless image
 
@DeadMG my goggles work, thank god. Also, "her"
 
user1357851
^
 
user1357851
2:12 PM
also what makes you think I don't understand, maybe I do and love to be hated :p
 
@Klasik and why are you asking me?
 
user1357851
BTW I am saving the best spam pic to the last (I might even get suspended for it) But I reckon it is worth the very risk :p
 
I already moved this yesterday. The hint: get it.
 
@DeadMG thanks
 
2:17 PM
I had to check this word
To see if it's real
 
what word?
 
Thank you puppy :)
 
what the hell does "elucidate" mean?
 
no problem
 
2:19 PM
@BartekBanachewicz Make (something) clear; explain
 
@TonyTheLion TIL
 
TIL you suck? :P
 
Guys why my post moved or removed somewhere? it is this chat not for programming discussions? or something I don't uderstund?
 
it was removed, because we are not a helpdesk
 
2:24 PM
Mar 7 at 15:07, by Lightness Races in Orbit
New to this room? Here's a chilling idea: read this! You won't regret it. Promise.
 
thx
 
Shit, arse, fuck, stuck. Left sidelights on all night:( Yes - the car does squeak if you get out with lights on, but I had earbuds in :(
 
@DeadMG get lost
 
@BartekBanachewicz That would be difficult to implement, as I know precisely where I am and have no reason to leave my current location.
 
@DeadMG I know precisely where I am and I do have reason to leave my current location, but can not.
 
2:29 PM
@MartinJames >driving with earbuds
 
@melak47 It was only couple kliks on empty road.
 
@MartinJames how would you know if they were empty, you couldn't hear a thing! :p
 
@melak47 My eyes worked. My car lights worked, (for too long, aparrently).
Now I am stuck. Neighbour borrowed my battery charger and blew it up. I have only a 2A bench power supply to charge the 60AH battery. Could be here a while..
 
only 30 hours
 
@DeadMG Somewhere, I have another 2A supply, but cannot find it :(
 
2:36 PM
you'd still be here a while
 
@DeadMG I only need enough energy in the battery to start the little 1.4 diesel. I reckon a couple hours ought to do it.
 
don't cars recharge their batteries as they drive?
 
Xeo
That's why the battery doesn't need to be charged to the brim
 
yeah, I just wasn't sure.
 
@DeadMG I hope so:) The alternator is fine, the engine is fine. The only real problem with the car is that the battery is empty because the driver was stupid.
 
Xeo
2:39 PM
i.e., you
 
@Xeo Sadly, yes.
 
Xeo
Btw @Andy, you can make the evaluation problem go away by changing the direct invokation of underlying_type to a conditional one
template<class C, class T>
using InvokeIf = Invoke<Invoke<std::conditional<C::value, T, std::enable_if<false>>>>;
Or something like that.
And then template<class E> bool operator!=(E e, InvokeIf<std::is_enum<E>, std::underlying_type<E>> n);, which would give you SFINAE for free.
 
@Xeo Yes, that makes sense, thank you. I thought about something similar, but I rushed into trying to figure out if the solution I proposed was OK. I seem to have troubles understanding what the standard does or does not mandate
 
Xeo
Hmmm
InvokeIf is a bad name, it should just be LazyEnableIf<C, T>.
 
2:56 PM
@Xeo Btw I see you have an article on overload resolution on flamingdangerzone.com, I'll read it as soon as I'm done crafting my question ;)
 
Xeo
It's not really a tutorial on overload-resolution per-se, just about getting it to do what you want when you have a partially restricted overload set. :)
 

« first day (883 days earlier)      last day (4058 days later) »