« first day (67 days earlier)      last day (4872 days later) » 

12:08 AM
Well, I just spent the last two hours trying to figure out why my changes to a source file weren't having any effect, only to discover that there are two files in different directories with the same name and I was editing the wrong one. If that's not a good sign that it's beer-o-clock, I don't know what is.
 
12:23 AM
@JamesMcNellis Happened to me a couple times before, it's not fun. I once got so frustrated I deleted the file I was editing and it still compiled and ran! :)
 
hi
Does someone know a link for the VC++ 6 compiler , I just want to begin php extensions , I've already VC9 installed, but I need VC6 to compile for php 5
 
 
6 hours later…
6:21 AM
@SimoTAQI If you have an MSDN subscription, you can download it from msdn.microsoft.com. To the best of my knowledge, there's no other direct way to get it since it's no longer supported by Microsoft (it's over 13 years old now, you know).
 
 
4 hours later…
10:16 AM
lol c++ channel dead?
buzzword of the year: "POD"
@sbi the first FAQ entry is a bad one. the answer given there is factually wrong
(the first "POD" faq)
I think Steve Jessop's answer to that question is a whole lot better than the accepted answer. Indeed i voted it up. It also fits the "POF" term
 
sbi
@JohannesSchaublitb The "first"? By which ordering?
 
sbi
@Johannes So what do you propose?
 
I propose the questioner of it to select the other one -.-
most ppl will read the FAQ question then only read the accepted answer. But it's wrong because it says only classes can be POD, and not int/char etc :(
it also says the POD class cannot have member functions or typedefs, which is also wrong.
 
sbi
Well, short of the impossible (making the questioner change his mind), what options do we have?
 
i have no idea
lol
maybe the questioner is able to change his mind
 
sbi
Did you try to tell him?
Mhmm, Greg is online (or was, 28mins ago). Maybe we can persuade him to fix his answer?
 
10:47 AM
hm maybe it could work
 
sbi
Go for it!
 
hello
I have a bunch of functions defined like this in a .h file
 
sbi
Hi Tony!
 
inline std::string toString(int value)
{
	std::stringstream ss;

	ss << value;

	return ss.str();
}
I tried to use this in another CPP file and my compiler says:
(DataSerializer.obj) : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl toString(int)" (?toString@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) already defined in (ResolverThreadPoolManager.obj)
 
sbi
@Johannes Playing with pins again? :)
@Tony It shouldn't do this if the function was inline.
 
10:50 AM
DataSerializer does indeed include that file, but now I need it in ResolverThreadPoolManager too... compiler not happy
even if I take out the last added include, it still complains
baffling
 
@sbi :)
@sbi i put a comment on his question linking to this discussion
damn that log view is totally confusing IMO
"last day" should be "next day" i think
 
sbi
@Tony Are you sure it's complaining about this toString() function? It shouldn't.
 
@sbi well that's what it says
and that's the only functions i have named as such
 
sbi
@Tony Set up a test project with two cpp files and one header. Put that function into the header and have both cpp files include it. put a function into each cpp file calling this function. put a main into one of the cpp files calling both functions. Compile and link. If this fails, there's something fishy with your compiler. If it works, there's a difference between this test project and your real code. Find that difference.
 
@sbi greg is online in IRC. i've just sent him a message
 
11:00 AM
@sbi ok let me try that
@sbi it seems to work as expected
 
sbi
11:23 AM
@Tony Then there's some difference in your project. You need to hunt that down.
 
Wish me luck
lol
 
sbi
(My first suspect would be a missing inline. But I had already mentioned that.)
@Tony One way to find the problem would be to take a copy of your project and start removing parts until the problem disappears.
 
when including a file what the difference between using "" or <>?
 
sbi
12:04 PM
@Tony The standard isn't very definitive on this. Basically, <header> is supposed to be stuff that's installed on your machine, while "header" is supposed to be stuff that comes with whatever project you're compiling. In praxis, this determines where the compiler looks for a header.
 
 
1 hour later…
1:09 PM
@sbi thx :)
 
 
1 hour later…
2:24 PM
the sound of silence...
 
sbi
@Tony "Hello darkness my old friend..."
Nice song, that.
 
sbi
3:23 PM
Woah, everybody on holiday already??
Hullo?
<echo/>
..llo?
 
I was researching your question.
std::string::swap is noexcept in C++0x.
 
sbi
Ah. Thanks.
 
std::swap is noexcept(see below) ha ha
 
sbi
It's not throw() in C++03, though. (std::string::swap())
And 21.3.5.8 doesn't even mention exceptions.
 
Ah, see below expands to:
is_nothrow_move_constructible<T>::value  &&
is_nothrow_move_assignable<T>::value
@sbi Right.
 
3:28 PM
@sbi hello
 
sbi
So? Might it throw in C++03?
 
not on holiday yet
 
sbi
@Tony I wasn't doubting you being here. You are always here. :)
 
@sbi I guess it could. I can't imagine why an implementor would throw anything from std::string::swap, given that it is easy to implement without throwing anything.
I'm surprised that in the C++0x Swappable concept there is no mention of exception safety or nothrow guarantees.
 
@sbi hehe
so is it good practice to apply these exception guarantuees to all functions one creates?
 
sbi
3:33 PM
@JamesMcNellis You mean there's nothing in the standard preventing implementers from providing a throwing std::string::swap() in C++03??
That's hilarious. At best.
 
what if it can't be swapped? an unswappable string of chars? LOL
is there some way to check pointers for null besides using if(someptr) that is perhaps somewhat less intrusive?
 
@Tony It's not even swapping strings of characters. It's swapping pointers to strings of characters (well, a good implementation wouldn't swap the contents of the strings).
@sbi I don't see anything that would prevent it.
I'm more surprised about the Swappable concept not requiring that all swap functions be noexcept... I'm not familiar enough with the changes made to the standard library for C++0x to know why, though.
 
@JamesMcNellis is there some template I could use to check a pointer for null? instead of if statement
 
@Tony Testing whether something is the case or not is the job of an if statement.
2
@Tony Use fewer pointers or avoid null pointers; then you don't have to test for null nearly as frequently.
 
@JamesMcNellis I guess that could be an idea
 
4:11 PM
what do you put in a catch (...) {} that is supposed to catch exceptions that aren't caught by the libraries exception objects? Is a catch all really that good an idea?
 
4:53 PM
@Tony: Generally not a good idea. Ignoring exceptions and continuing to run will result is messed up heaps and other nasty problems.
 
@JohnDibling so you advise I do what then?
 
@Tony: Honestly, crash.
Handle known/expected exceptions, and let the others propogate. If an unexpected exception is generated, the program should die. SThis gives you an opportunity to generate a dump file close to the point of the defect, and you can use this to find & fix your problem
 
sbi
@Tony If you don't know what exception you have, you can not do anything.
 
If you try to catch everything, even exceptions you dont expect, you will make it impossible to find & fix the problems that are causing the unexpected exceptions
 
sbi
@Tony Doesn't this library have a bas class you could catch?
@JohnDibling Plus VC used to catch non-exceptions like Access Violations in catch(...). Bummer, that.
 
5:17 PM
@sbi: OK, that sucks. OP'
OP's questions should not have been made CW
we can't un-do that can we?
 
sbi
@JohnDibling No:
5
Q: Conversion from CW to non-CW state?

Prasoon SauravThe question is short and simple. Why can't Community Wiki posts(specially questions) be rolled back to non-Wiki state? P.S : Recently my post here was made CW (by mistake I guess) so I was wondering if something like that(conversion from wiki to non-wiki state) could be implemented. Its merely ...

 
Lame.
 
sbi
5:33 PM
We need an FAQ entry for most-vexing parse.
 
Do we really? I dont see this come up too often.
 
Yes, but when it does, it is a most vexing problem.
2
 
sbi
@JohnDibling There's currently nine questions labeled as most-vexing-parse. Actually, they all ought to be closed as dupes. I'm sure there's dozens more of these out there.
If we found a good answer that got accepted, we could tag that as an FAQ entry.
 
@James: LOL, I see what you did there.
 
5:58 PM
Yay, I made a joke!
Hey, it looks like this slacker has returned!
 
sbi
@James Yeah, I noticed here the other day.
 
@sbi Huh. I wonder if he knows that when you create a sockpuppet account, you're supposed to use a name other than your own for it :-P
 
sbi
@JamesMcNellis LOL!
 
 
4 hours later…
9:42 PM
wow its quiet here
I have a question, what does this actually mean then:
template <typename U>
    operator U()
    { ....
that anything executed inside the operator U() would be execute which ever operator was entered there?
 
It's a conversion operator
Any time the object is converted to another type and that template is selected.
 
is it me or stackoverflow.com/questions/4514008/… shouldn't work ?
 
@JamesMcNellis oh I see
so rvalue references, they are references that can be assigned to something else, basically, correct?
 
@icecrime That looks very fishy.
 
5 upvotes for an incorrect answer
Speed is worth so much more than accuracy on SO :)
 
10:00 PM
@icecrime it really should be the other way
I guess the upvotes come from people not really understanding what the question or answer is about
 
10:29 PM
OK, it's a deleted answer, but I still have to LOL: "No, c++ does not implement multiple inheritance."
 
@Tony I'll upvote any answer if its first letter is H.
 
@JohnDibling Link or it didn't happen!
 
10:29 PM
:)
 
Well, I forgive him.
 
Because it was deleted?
 
That's no worse than my "no, you can't copy construct an auto_ptr from a temporary" answer, which I deleted.
 
Seeing deleted answer is a 10k privilege ?
 
@icecrime Yes.
 
10:31 PM
@icecrime: It was pretty enlightening to me when that was turned on for me. :
 
I feel violated
 
i never realized how often high-rep people delete their own answers
 
I was about to say the same thing. I felt much less dumb when I saw that other people deleted their answers at least as frequently as I do.
 
oh :)
well, 495 left to see this by myself
 
some people i assumed were just never wrong about anything are among those who delete their own answers the most
 
10:34 PM
nobody is never wrong
 
this, it turns out, is true
 
(especially when lurking on a tag such as C++)
 
I suppose if there were a [GW-BASIC] tag we might find someone who's never wrong :)
 
"C++ programmer specializing in market data servers"
so many developers from the financial area on SO
 
that's interesting, because the industry is very small, people-wise
 
10:42 PM
Apparently only midgets can write financial software.
 
ahaha :)
 
10:55 PM
hmmm
 
@Tony No. An rvalue reference is a reference that can bind to an rvalue. Sadly, most explanations of what an rvalue actually is (for example "right side of an assignment", "values" etc.) are completely wrong. Watch this video to learn more.
> As I explained in the video, lvalueness/rvalueness is a property of expressions, not objects.
(This is the most important point.)
 
the committee is drifting away from that interpretation, sadly
 
@JohannesSchaublitb How can they change the meaning of a 12 year old term?
 
I don't know how accurate it is, but I found this article helpful
 
@icecrime It's complete crap.
 
11:00 PM
when i did a defect report over usenet about this: template<int const A> struct B { decltype(A) a; }; and that it's unclear what a's type is, they said the standard requires it to have type "int", because A is said to be a prvalue and so it's unqualified
so they attributed the rvalue property not to an expression, but to the template parameter itself
 
@FredOverflow oh ok :)
 
@icecrime The sentences starting with "An lvalue is an expression e with the property that..." and "An rvalue is an expression that refers to a memory location..." are wrong.
 
i still think that it'S the wrong interpretation though :) A "is" not a prvalue. it just happens that an expression refering to it is a prvalue
 
@JohannesSchaublitb Sadly, many people don't understand the difference between the expression itself, the process of evaluating the expression, the result of that evaluation, the object it designates (if any), the expression's "value category" etc.
Many people also don't understand the difference between operator precedence and order of evaluation.
 
yes, and the standard doesn't help clearing it up
n3225 for example says "The value of a literal such as 12 is also a prvalue" and "A rvalue is ... a temporary object.".
 
11:07 PM
@JohannesSchaublitb Yes, I cringe at the last sentence.
 
it's the literal itself that is a prvalue, and it's the expression itself that refers to the object that is a rvalue
 
Omg where does it state that the value 12 is a prvalue??? Must... find... standard...
 
@JohannesSchaublitb Defect, defect, defect! How can such obvious errors survive for so long?
 
i have no idea.
 
11:09 PM
Here is another error: "The result of calling a function whose return type is not a reference is a prvalue". It's not the result of calling the function, but the expression name of the function, open paren, close paren.
3.10/1 starts so nicely with "expressions are categorized...", and then all those mistakes... I really don't get it :(
 
yes i think that entire paragraph is very bad worded
 
@JohannesSchaublitb s/bad/badly/ ;)
 
indeed :) i think it was a self-referencial sentence
lol
 
@Joh: Why does Haskell use :: for types and : for cons, shouldn't it be the other way around, looking at other languages? :-)
 
11:27 PM
hm dunno :)
maybe they need : more often than ::
what's that star next to the channel name?
it looks fun today
 
@JohannesSchaublitb What is ->* anyway, pointer to member dereference or something? I have never explicitly used it, so far.
@JohannesSchaublitb How often do you do a cons? Not very often, I would say. And types are everywhere, although most of the time, you don't write them down explicitly...
 
yeah when i wrote some haskell code i didn't need to write the :: stuff. all things were inferred
 
@JohannesSchaublitb Type inference is kinda scary the first time you see it if you are used to C++'s explicit typename iterator_traits<T>::value_type tediousness :)
2
 
I especially love it when the types get so complicated they span an entire line. "WTF, what does this weird line do?" - "Oh, that's just the return type of the function!" :-)
 
11:54 PM
lol
 

« first day (67 days earlier)      last day (4872 days later) »