« first day (761 days earlier)      last day (4170 days later) » 

user1804599
1:00 PM
If you have lots of state, yes, I would be scared too. :)
 
It happened to me, once. Good times.
 
Well, I could move Endianess to a template on the Reader, but that'd make all the Readers I define template classes, like BinaryReader<ReverseEndian, UTF8Encoding>
 
What's wrong with that ?
 
@ThePhD Or just pass an enum into the constructor and leave it at that.
also
a binary reader... with UTF8 encoding?
sense: this makes none.
 
For when Strings are embedded in the text.
 
1:02 PM
I wrote some endian functions a while back if you want them
 
@ThePhD Can't each reader just create something like an Endian<NativeEndianness> object internally? Where NativeEndianNess is computed with some metaprogramming trickery so it evaluates to the right type of endianness
 
@jalf That's fine, but when you have to read a PNG File or a Flac file (which I do), I need to change that Endianess.
 
void Dispose ( bool disposing ) {
if ( disposing ) {
if ( !disposed ) {
if ( readbuffer != null ) {
delete readbuffer;
readbuffer = null;
}
if ( endian != null ) {
delete endian;
endian = null;
}
if ( encoding != null ) {
delete encoding;
encoding = null;
}
if ( streamowner ) {
if ( stream != null ) {
delete stream;
stream = null;
}
}
disposed = true;
}
}
}
 
@ThePhD but when you're reading a PNG file, you know what endianness to expect, so yuo create an Endian<BigEndian> or whatever
 
@DeadMG What is this shit ?
 
1:04 PM
Perhaps it's excessive laziness, but I don't want to write a PNGLoader just for the purpose of reading a PNG. I wanted my Readers to be generic enough to handle most cases, with the exception of special shit that Flac sometimes pulls out of its ass.
@kbok PAY NO MIND TO IT I SWEAR IT WASN'T MY FAULT.
 
user1804599
@kbok looks like C++#.
 
C++--#-Objective. Framework.
 
@ThePhD Then it's the job of the user to deal with them.
 
user1357851
objective C#++
 
user1804599
Objective-Java#++
 
1:06 PM
Why are you guys repeating my joke
 
The pain.....
 
looks like it was Aardvark's joke first.
 
There's this really important question i ask myself every time, basically current project survived only because of it: "Do i really need it?" :)
 
oh, by the way
readbuffer = new byte[ 16 ];
 
user1804599
It was not a joke. I was serious.
 
1:07 PM
Most of the time it turns out that im not.
 
Ah, well, hum.
 
UB, you new[] and then delete.
 
Oh, woops. My bad.
 
uh, no.
 
@ThePhD Don't worry, admitting that you made mistakes is the most important part
 
1:08 PM
the problem isn't this one case of UB, it's that there's going to be a thousand identical cases all over your codebases
 
@kbok yes, because then people know who to blame and feel superior to! ;)
 
user1804599
@jalf the cat!
 
0
Q: "Template" of sorts for HTML website

BluefireI have a website which currently resides in the form of HTML files in my server's folder. I have some elements that are present on each page, and have to be the same, e.g. the navbar. When I add a new link to the navbar, if I want to make that effective for every page, I have to go around every s...

^ :') priceless
 
user1357851
I refuse to answer any question from this room now
 
user1357851
only get my rep deduced no matter what
 
user1357851
1:10 PM
devious
 
@jalf Oh, you don't have to tell people about it :)
 
Well, I'm fairly lost then. I don't know how else to handle this kind of stuff.
 
@ThePhD Use RAII. std::unique_ptr, std::vector, etc.
and don't dynamically allocate unless you really have to, I mean, why even is readbuffer on the heap?
 
@DeadMG dude your answer is so wrong
 
It doesn't have to be on the heap, I can probably change it to a std::array. I was originally just playing around with the reading buffer sizes I would need. Before it was just a uint, then I was reading Long Longs, and then I had some other uses, so I expanded its size, but it's not really worth having on the heap.
 
1:12 PM
@kbok o rly
oh well
 
might be worth clarifying that when he says "don't put anything on the heap", it means "don't allocate it with new". Putting it in a vector technically means that it's stored on the heap, but you didn't have to call new, and you're not responsible for the delete
 
By the way, is it ok to use thos RAII containers for class members?
 
of course
 
@Ivan0x32 Wouldn't be very useful otherwise :)
 
@jalf And I'm also quite forgiving for e.g. make_unique.
but for arbitrary application code X, you should not have either new or delete- all the ok places are special cases.
 
1:14 PM
"heap" and "stack" are implementation details and no one should be worrying about this except when writing ABIs.
 
fuck that
 
The main thing is really "avoid delete and delete[] at all costs". The rest follows from there. It means you should hardly ever use new (if you do, it's just to pass the result into a smart pointer)
 
I could arse around all day using "free store" and "automatic storage duration"
 
And you should
 
but "heap" and "stack" is short, sweet, and everybody knows what you mean.
 
1:16 PM
We should write a proposal for C++14 to introduce the terms "kinda-heap" and "kinda-stack" to describe those
 
lol
 
Well, no, that's incorrect, and not everybody does, that I know for a fact because I keep explaining it to noobs
 
yeah, change the wording to make them official aliases
@kbok You have to explain plenty of things to noobs- this is no different.
 
Stack, is obviously, better, because:
 
Better not starting by explaining them confusing, blurry and useless notions then
 
1:18 PM
there's nothing confusing, blurry, or useless about "heap" and "stack".
they are convenient shorthands as for where the memory for an object came from
 
God, the template question is a ruin right now. The only upvoted question is blatantly incorrect and for some reason the two correct answers are downvoted.
Where does the memory of vector comes from then ?
 
@kbok both, obviously
 
the memory for the vector itself comes from wherever you put it, and the memory it allocates for itself comes from the heap
 
How is that not confusing for a noob seriously
 
well, that doesn't change no matter what you name those places.
 
1:20 PM
@Telkitty well, I'm pretty sure if you have a good answer, people will leave it alone or upvote. That way you could still get upvotes from people who don't know about this room (or don't like being here)
 
"The memory for the vector itself is automatic storage duration and the memory it allocates for itself comes from the free store."
 
@DeadMG yes there is. It's misleading as hell to a beginner
 
@kbok "a vector is stored on the stack or the heap, depending on how you create it. The vector can allocated memory it self, which it will do so on the heap" seems fairly simply to me
 
I use them when talking to someone who knows the difference, but to someone who doesn't, it's really a terrible idea to use those terms
 
std::array always allocates itself and its elements on the stack, right?
 
1:21 PM
Well then I suggest the two of you don't start a career in education.
 
well
 
That's all I have to say, going back to work now
 
objects stored in a vector are always in the heap. But they have automatic storage duration (which is what we often call "on the stack")
 
I do normally think of class members as "on the stack", even though actually they could be on the heap.
 
user1357851
@sehe Can I use pm here?
 
1:22 PM
@ThePhD Yep.
 
Same for class members. The class instance may be on the heap, but its members have automatic storage duration, but... they're still on the heap
@ThePhD unless you place the array elsewhere :)
new std::array... will put it on the heap ;)
 
stack - A nice layer of memory, you can (usually) only use the top 'layer' and in order to access others, you either need to stick a new layer on top, or remove the top layers.
heap - A big pool of memory sat aside to dump stuff, anything in there can be accessed at any time
 
Nope. Thank god.
Also: what answers?
 
@ThePhD it'd be more accurate to say that std::array always allocates everything wherever you put it
 
Okay.
 
1:23 PM
@thecoshman No - you can access anything that is below on the stack in the same manner you can access what is on the heap - you can just not delete it
 
user1357851
@sehe doesn't matter now
 
@kbok bah, but still. the concepts are easy enough
 
@DeadMG In the case of the goto theend I have, how would I create an object to RAII (sp?) it? Just have a struct that contains all the relevant objects and blows up when the function dies?
 
@thecoshman Well... No ?
I maintain that they are implementation details
Also the major differences between the heap and a heap and between the stack and a stack are nothing helpful
 
the heap isn't a heap
 
1:29 PM
@Pubby It was in some older implementations hence the name
 
Stack and heap, while short and nice, probably aren't as good as dynamic and static memory. To me, anyways.
 
@ThePhD except 'static' implies some sort of compile time constant
 
Dynamic and automatic
 
hey guys...i m new to c/c++,i am geting an error with the following code.
pls tell what should be the out put :
void main(){

int i;

float a=5.2;

char *ptr;

ptr=(char *)&a;

for(i=0;i<=3;i++)

printf("%d ",*ptr++);

}
 
There's dynamic, automatic and static.
 
1:31 PM
@thecoshman Sure, guaranteed at compile-time to construct and destruct during the lifetime of the function/object/etc. :D
 
@kbok well, does the standard actually state HOW memory should be allocated
 
@joeyrohan void main is invalid
 
how?
no..its old compiler..turbo c/c++
 
what error? compile or runtime?
 
What, no, please
 
1:32 PM
it has void.
run time
 
Can you guys move to some "Turbo C" room or something ?
 
Type punning is UB
 
anyway just ask a question on stackoverflow, not here
well answer it there
 
Like a "Back To The Future III" room for instance
 
was expecting help:(
 
1:33 PM
the real WTF, using Turbo C
 
well,u can remove void,and add return,no probs,m askin abt the actual code
 
@joeyrohan why is this not in the bin?
 
guis
 
I was expecting a girl to jump in my lap and start a party, bringing all of her cute friends over.
 
what
 
1:34 PM
But it didn't happen.
Damn. :c
 
@Cicada ¬_¬ timing...
 
Dat timing.
 

Help Desk

For Turbo C/C++ and Dev-C++ questions
 
i'd rather stay in present :)
 
1:36 PM
@Cicada you have cute friends ?
 
technically yes
 
If they look like your sstream guy don't bother
 
where are the cute friends
 
To clarify, I was attempting to mock @joeyrohan, not talking about @Cicada </legaldisclaimer>
 
@Cicada ''technically'?
 
1:37 PM
except that they are not friends and not cute?
 
@kbok No. They don't look like him :D Also they're my age.
@kbok Btw.
Have you noticed he has a slight hair on the tongue?
 
I didn't talk with him.
 
Don't you get a fuzzy tongue from like chewing tobacco?
 
Ah. Oh well.
@thecoshman Yes, cause "cute" is a subjective concept.
 
@Cicada I'm relieved.
 
1:38 PM
@Cicada the surely the correct response would be "yes, potentially"
 
The technicalities of subjectivity.
 
@thecoshman how about fuck you then!
 
Well.
I think that now that I have mortally embarassed myself in front of DeadMG,
 
@Cicada it's a bit a trek for a night of passion, but thanks anyway
 
I think I shall retire for a while.
 
1:39 PM
Shitty question alert
0
Q: Why are C++ int and long types both 4 bytes?

hodgesmrMany sources, including Microsoft, reference both the int and long type as being 4 bytes and having a range of (signed) -2,147,483,648 to 2,147,483,647. What is the point of having a long primitive type if it doesn't actually provide a larger range of values?

 
Take cover.
 
I was right !
 
@kbok I'm pretty sure there is something this can be closed as duplicate of.
 
I'm a language lawyer now.
 
I keep answering questions and then someone here calls them shitty
 
1:43 PM
edit + upvote because you're less lazy than me
 
Downvoted for the giggles.
j/k
 
Look at me, I'm a Language lawyer in my answer!
Oh wow.
You're all language lawyers too.
Now it's just not as cool anymore.
 
You're not a lawyer if you don't have standard quotes using that little squiggly character
You're just a public defender
 
This question is not about C at all — thecoshman 10 secs ago
have a down vote sir!
 
Hehe.
Alright, well.
 
1:50 PM
I wonder how much code is out there that relies on the fact that a integer type is only so large
 
@thecoshman My code.
I use int everywhere, even though I went out of my way to define int32 and uint32 and int16 etc.
 
I wonder why people still make their programming lives more complicated with confusing code pages instead of just using Unicode: stackoverflow.com/questions/13391252/…
 
user1357851
Maybe this room mainly consists mean people ... shall I rephrase this room attracts and retains mean people.
 
oh no, I mean, code that relies on int being 2 bytes, and would brake if it where made to be 4 bytes
@Telkitty we just don't take shit, and won't beat about the bush about the fact we wont take shit
 
user1357851
@thecoshman shit is objective
 
1:52 PM
long and short are pointless
 
However "pointer" is not
 
user1804599
Pointers lack points, so they are pointless.
 
@Telkitty act a twat, and we will tell you
 
Damn, I read "pointer" is hot
 
@Mr.C64 totaly agreed
 
1:54 PM
can somebody help me please? how can i convert a **pointer to a *pointer?
 
@kbok I'm not the kind of girl that dereferences on the first night
8
 
(*pointer)
 
@rosualin Dereference it?
 
@rosualin reinterpret_cast
 
your not about convert it, its dereferencing
 
1:55 PM

Help Desk

For Turbo C/C++ and Dev-C++ questions
2
 
i have this code (blackberry native SDK)
 
@rosualin blackberry? burn it
 
@Pubby funny way to troll noobs :)
 
@Cicada *nights[0] ?
 
1:56 PM
yeah, i'm an android developer, but we have a blackberry project now, for blackberry 10, and i don;t reallly know c++ that well
how can i dereference it?
 
You're code looks correct
 
battery_info_t *pointer=NULL;
battery_get_info(&pointer);
return battery_info_get_time_to_empty(pointer);
^ This is probably the way to do it
 
^ I second this
 
user1804599
@rosualin using the dereferencing operator.
 
@Cicada I'll disagree, just to be awkward
 
1:59 PM
@thecoshman Nevermind, not funny
 
@kbok huh?
 
user1357851
@thecoshman usually when I was told it was not me who acted like a twat though. Want respect, you have to earn it shrug
 
@kbok thanks, i think it works
have no errors, but it tells me i have 65k minutes left of battery, but being an emulator, i can't really tell if it works or just fucks up
 
@thecoshman TIL a fullscreen window on windows is just a borderless window :o
 
user1804599
 
2:04 PM
@melak47 no it's not.
 
@Aardvark wat
 
user1804599
@melak47 I am an atheist.
 
@thecoshman it's not?
 
1
Q: Why are C++ int and long types both 4 bytes?

hodgesmrMany sources, including Microsoft, reference both the int and long type as being 4 bytes and having a range of (signed) -2,147,483,648 to 2,147,483,647. What is the point of having a long primitive type if it doesn't actually provide a larger range of values?

Whoa, why is mine answer the accepted one? :D
 
Holy shit, 12 upvotes for that one answer?
 
2:05 PM
Sometimes logic behind accepting answers by OPs is completely weird.
 
@melak47 nope. a 'full screen' window is a a twat to alt-tab out of, a borderless maximised window, is just like any other window and can be alt-tabbed from with ease. It's to do with how much the OS hanfs over control or something like that
 
user1357851
 
@thecoshman hm, right. do we want our window to be abitch to alt tab out of? :p
 
@Telkitty not really, just don't act like a twat and people want ignore you. I will clarify here, I have no beef with you, but there does seem to be an air of dislike for you. Not trying to be mean, just calling it like I see it
 
@thecoshman Fullscreen windows also render faster and can drive multiple monitors.
 
2:07 PM
@melak47 I think there is a performance gain for true full screen. As a general rule though, you will let it be configured
 
Oh, kill me. My internet connection slowed down to 20 kbps, for some weird reason.
> Fetched 287 kB in 13s (21.1 kB/s)
C'mon.
 
@thecoshman hmm, how do I get a "true" fullscreen window then, everything I looked up said pretty much "make a borderless window, tell windows to fuck off with the task bar, and thats it :D"
 
@DeadMG it takes a bit of work to get multiple monitors though doesn't it?
@melak47 I might have some old code for it, I'll have to root around for it later
 
@thecoshman Dunno about OGL but in D3D it does.
 
@DeadMG probably just as tricky :P
 
2:10 PM
but what I'm mainly saying is that the graphics driver also determines several differences between fullscreen windows and non-fullscreen ones
but newer versions of Windows tend to be much better with alt-tabbing
 
I think it's more about getting windows to give you to two contexts
 
@DeadMG so I guess that's why they came up with eyefinity and what'sitcalled from nvidia? just one render target for all windows or something?
 
user1357851
@thecoshman you dislike all newbs
 
user1357851
not you
 
user1357851
but you know what I meant
 
2:11 PM
@Telkitty no, just twats
 
@thecoshman all I can find says to just ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN); and that's what I did. still lets you bring up the start menu and alt+tab out of it without hassle
 
@melak47 That's completely different.
 
@DeadMG ok.
 
@melak47 you can still alt+tab an wind_key in true fullscreen, it's just usually a total twatter because it takes windows years to work out what to do
I think in true fullscreen mode, it releases more or less everything it can so that your game can have more of the GPU
 
@thecoshman IME that depends heavily on the application.
some of them take a really long time, some are much faster
like Dragon Age: Origins was a complete bitch and the Source Engine always takes forever/bugs out, but some like Starcraft 2 were really no problem
 
2:16 PM
@thecoshman hmm, maybe it takes a while, or I'd actually have to load some resources with my context, before it starts taking forever
 
true, some games seem to be not so bad, but perhaps they are not true full screen and just really hogging
 
right now it's just the backbuffer :p
 
@DeadMG fairly sure StarCraft 2 didn't use true full screen
 
and alt+tabbing is instant
 
@thecoshman You can tell the difference between fullscreen and a full screen window fairly easily, and it was the real full screen.
 
2:18 PM
@melak47 yeah, you really arn't doing much at all. For now, I would just have true full screen and maximised borderless do the same thing
 
depends on what kind of game you aim to create, really
 
you can worry about getting true full-screen later, if at all
 
the main thing is
if you want to do maximised borderless, you have to lock the cursor
else people with multimonitor setups like myself will always have the cursor running off the edge of the screen
 
@thecoshman well, it's no trouble so far. and what I'm doing might actually be "true fullscreen" since it does give a performance boost. (~600 fps just refreshing in windowed, ~1000 in fullscreen)
 
I imagine when we get close to a real thing, we would have a small borderless window for a splash screen whilst some basic config files are read (if we even bother with the splash screen) and once config has been read, fire up the window
brb
 
2:20 PM
0
A: Convert unsigned char* array to std::string

Pete BeckerSeems like an awfully complicated way to write std::string str(dataToSend, dataToSend + sendLength);. <g>

lol
 
I have a question:
When I have a class template, member functions don't actually produce any code unless they're used somewhere, right?
Is there an exception to this rule for virtual functions?
 
yeah
 
@KerrekSB oh, you mean if you have a template class with two functions, but you only ever use the one? I think all functions are created for the type you pass in as the template, but the compiler should be able to remove the code that is not used as a trivial optimisation
 
the compiler would have to know all TUs, everywhere, to know that it can eliminate a virtual function.
 
@thecoshman No.
@KerrekSB They are only instantiated on demand, yes.
 
2:29 PM
for a regular function, it won't have to instantiate in a given TU unless you call it in that TU.
 
@thecoshman No no, there's an explicit rule that functions don't get instantiated until used.
 
@R.MartinhoFernandes to which part :P
 
But with virtual functions that would make no sense, because you might never actively mention it. It might only be called through the base.
 
is what I just said :P
 
@DeadMG Right. Or consider a dynamically linked scenario, where you could never know this.
@DeadMG Yes yes, good. Is there a clause in the standard that actually says this?
 
2:30 PM
no idea, but it doesn't matter
implementations have to behave this way regardless of what the Standard says
 
Well, that's true...
 
> First thing I do? Search for the word “bank” to figure out where you do your online banking. I go there and click on the Forgot Password? link. I get the password reset and log in to your account, which I control. Now I own your checking account as well as your email.
WTF, there are banks that do this?
 
user1357851
lol that's why I have 4 regular passwords
 
user1357851
And I am not a fan of log in using facebook or twitter
 
I cannot reset my online banking password without actually going to a bank.
 
user1357851
2:37 PM
but I am currently filling an application using linkedin
 
user1357851
it is like they have to verify I am not a monkey
 
user1357851
and in order to succeed I better have a lot facebook friends
 
@Telkitty I don't have any regular password. That won't protect you anyway if your bank sends your credentials to an e-mail account.
 
user1357851
I am not on facebook
 
Found it:
An implementation shall not implicitly instantiate a function template, a member template, a non-virtual
member function, a member class, or a static data member of a class template that does not require instantiation.
It is unspecified whether or not an implementation implicitly instantiates a virtual member function
of a class template if the virtual member function would not otherwise be instantiated.
 
2:38 PM
There is nothing you can do to protect yourself if your bank does that. Other than switching to a non-idiotic bank.
 
that's why I am glad to have two step verification, like that article says, your email has become a linchpin and two step really helps with that
 
user1357851
scary thing: asking you to use facebook account or gmail to log in
 
There was a thing in Skype for the past few months where you could reset steal someone else's account by some relatively simple password reset acrobatics.
 
user1357851
so what they can access my mail and facebook now?
 
No, they cannot. Don't be silly.
 
user1357851
2:41 PM
Ok, here is what I know what can be done ... if you use gmail or facebook or whatever you use a lot to log in, they will store you login name and password and use gmail or facebook's authentication to log you in
 
@KerrekSB yeah, but skype disable the reset feature really fast I hear
@Telkitty no
 
@Telkitty lol
 
user1357851
which means they have your login name and password
 
user1357851
not that I am assuming they do
 
@Telkitty That would be if you thought you were using gmail or facebook to login, but were actually on a phishing site.
 
2:42 PM
when you use open Auth, or what ever you want to call it, the service (such as gmail) gives the sire you are logging into a sort of key that represents you
 
@Telkitty They don't.
Stop spewing bullshit.
 
You'd hope...
 
@R.MartinhoFernandes he's not so much spewing bullshit, as refusing to listen to the fact he is wrong in his assumptions
 
user1357851
I am saying they could be
 
user1357851
not that they do
 
2:44 PM
@Telkitty no, the user name and password you enter are sent directly to the service you are logging with (say google) the only way the site gets these details is if they are actually phishing
 
@R.MartinhoFernandes He doesn't, because for my banking account, I log in using 8 digit number that was only once sent to me by real mail, my password and 6 digit number from key generator I have always with me or (for read only access) using 6 digit number I haven't written down anywhere.
The password is one tiny part of the logging process.
 
user1357851
nowadays I also receive sms when I want to access my credit card account
 
user1357851
lol
 
@Griwes Yeah, my bank has a similar process. I am surprised that there are banks that do that (or that he assumes all banks work like that).
@Telkitty Only if you end up in a phishing site.
 
Also, security questions are brain dead. The only thing we need is that we start thinking like this: xkcd.com/936
 
user1357851
2:47 PM
P.S. I have looked up authentication plugins for my apps
 
user1357851
I am speaking from experience
 
For example, MS enforces that you use a-z, A-Z, 0-9 and special character, and that your password is at least 8 char long.
 
user1357851
not that I am using any 3rd party authentication in my app
 
Btw, I don't type any passwords when I use Google to login to Stack Overflow. How do they magically obtain my username and password?
 
2:48 PM
And EVE/CCP enforces the same PLUS you cannot use the same password twice in account history.
 
Just because some fuck can't make passwords longer than 16 chars
because you know, storage is so expensive
 
:D
lol, you are storing passwords as hashes anyway, aren't you...? :D
 
@R.MartinhoFernandes hacks
 
Also that
 
user1357851
because it is a plugin. You use function calls to access apis
 
2:49 PM
It so fucking stupid
 
@Griwes Meh. That's more like a necessary evil.
 
user1357851
which you can obtain a copy when calling the API
 
It's like those websites where # or $ are forbidden in passwords
 
@Griwes only a matter of time before you have to start writing epic sagas in order to prevent brute force
 
FFS you can't base64 the password or something
 
2:50 PM
@kbok aka shit sites
 
@Telkitty Yes, and the APIs don't expose the password (because they most likely don't actually have it at all)
 
Some of them you have to use
 
@R.MartinhoFernandes Well, until we get unforgeable way to transfer fingerprints, it's gonna be that way.
 
Until recently there was only one train ticket reservation site
 
user1357851
authenticate (string name, string password)
 
2:50 PM
^ It's a pile of crap
 
user1357851
how do you suppose to access such function without passing name and password
 
@Telkitty Meh, I don't even know why I bother trying to explain stuff to you.
@Telkitty Link or it didn't happen. That's all I can say.
 
@Telkitty auth(string name, string password) { _auth(name, hash(password)); } \ _auth(string name, string hash) { ... } rather.
! :P
 
user1357851
 
@Telkitty here's how these services work. I want to log into your site, you send frank a token for my login, I log into franks, he responds to you with another token. That's me logged into your site, with out you haven seen any of the details I gave to frank
 
2:53 PM
@Telkitty Reading is a good thing. Just sayin'.
Just this once, I'll read it for you.
> password A newly created password (not their Facebook password)
 
@R.MartinhoFernandes he still has to read this though
 
I'm confused about ADL. The following code doesn't work:
#include <iostream>
#include <boost/any.hpp>

int main()
{
    boost::any multi(static_cast<char const *>("Hello"));
    std::cout << any_cast<char const * &>(multi) << std::endl;
}
It only works if I qualify boost::any_cast.
Shouldn't ADL solve this because multi is in namespace boost?
 
@KerrekSB ADL does not pick up if you use explicit template arguments. I think.
 
Ohh, of course
I think we actually just discussed this two days ago!
D'oh
 

« first day (761 days earlier)      last day (4170 days later) »