« first day (246 days earlier)      last day (4928 days later) » 
00:00 - 20:0020:00 - 00:00

20:10
0
Q: What does "stackenblochen" mean?

Johannes Schaub - litbIn a chat room, someone sent a link to this youtube video: http://www.youtube.com/watch?v=zqAdxN1IWQQ . In the video they use the word Stackenblochen I have never heard the word, even though I believe I know German reasonably well. Can anyone please clarify? Apparently, some Germans are ash...

@JohannesSchaublitb I thought German was your native language?
Is new (p) T(t); the same as *p = t; ?
Define "equivalent". ;)
one is initialization, the other is assignment
@jalf same
but for a POD type, it won't really make a difference in practical terms
20:12
@jalf but it will call copy constructor in the first, and assignment operator in the second?
yep
well, in the first it'll call whichever constructor fits the parameter
might not be a copy ctor, depending on the type of t
@jalf yeah it's my mother language
hence "I believe I know German reasonably well"
Seems that copy elision cannot be performed when calling vector.push_back(Data());
I what I just wrote a double negation?
Never mind that.
For my 3rd year final German exam I had to work hard because I had neglected it that year. So I started studying the grammar rules from scratch until I thought I had finally figured it out. On the oral exam I got 5 grammar questions. I applied the rules carefully, and yet got all of them wrong. They were all cases where exceptions to the rule apply.
Xeo
Xeo
@StackedCrooked Exceptional grammar :D
@Xeo Yep, that could be a bestseller.
 
1 hour later…
21:36
What's the STL algorithm for reduce/fold/aggregate ?
transform, I believe
no, wait, I think that's map
there's an accumulate
Yeah, found that.
It's in <numeric>, that's why I wasn't finding it.
there's a <numeric> header? lol
It's always been there in C++98.
never needed anything from it, I guess
21:42
@Martin Thanks for all your feedback, I appreciate it!
22:03
Oh noes! I answered a question after I hit the repcap! All that rep down /dev/null cry
sbi
sbi
@MartinhoFernandes Well, you know, there's always the minor side-effect that answering question helps the person who asked. Of course, here on SO it's more or less completely besides the point (the point being rep), but...
Ok, just in case that came across as serious, it wasn't.
Oooh, nice. std::copy_if will come to life in C++11. What an embarassing hole that was.
2
22:20
Ok, I can't get through standardese. If I have struct B {}; struct D : B {}; B *x; D *y;, then does y get implicitly upcasted to B* in expression x == y?
(C++03, and not that it's any useful, friend has a theoretical test of some kind.)
Xeo
Xeo
@CatPlusPlus Why don't you try and see?
It's theoretical!
Xeo
Xeo
Theory without praxis is just dumb.
Praxis, good word for it. Never thought of that.
Xeo
Xeo
@MartinhoFernandes cat rep > /dev/null
22:33
@CatPlusPlus I would think yes, D* is implicitly upcasted to B*.
@Xeo See what? Implicit upcast in the bowels of the compiler?
23:00
When comparing pointers, does it not just compare the stored memory address? Or does it compare types also
@Daniel An object that is derived from multiple bases can have more than one address.
In that cases, blindly comparing the addresses would give false negatives.
@MartinhoFernandes Oh, I know the comparison is legal, I'm asking about whether upcast happens there.
I don't see how else the comparison could be legal.
You can't compare distinct pointer types.
@FredOverflow, but does that mean you are comparing the memory storage of D's base class?
x == y wouldn't make sense, because your comparing two different parts of memory :|
@MartinhoFernandes Well, AFAIK the rules are: the types must be equal, or one is a subtype of another, or either is explicitly casted into void*. It's a terribly technical question IMO.
23:13
Well, GCC 4.3.4 gives an error if they're not subtypes. It does not cast to void*. ideone.com/xNfvp
Does casting D* to a B* gurantee it will change the pointer address to the correct address?
Upcasting derived to base must be correct, otherwise polymorphism wouldn't be very useful. :P
true :P
23:39
@FredOverflow Interesting, this had never occurred to me before.
00:00 - 20:0020:00 - 00:00

« first day (246 days earlier)      last day (4928 days later) »