From: Daniel Frey (d.frey_at_[hidden])
Date: 2002-10-25 02:46:31
On Thu, 24 Oct 2002 19:02:03 +0200, David Abrahams wrote:
>> The question is, why 'X x( f() );' is different from 'X x = f();'.
> I remember having this conversation with the EDG guys last year. For
> people whose heads are deep in the core language, apparently it isn't
> obvious that they should be the same, and that it won't be obvious to
> users which form avoids the extra copy.
As I said earlier in this thread, the EDG-folks proved me wrong more than
once. Do you remember any details or their argumentation? And does this
mean that the GCC 3.1+ is actually optimizing things it shouldn't? (I
don't hope so...)
The question that is still open and that I'm interested in even more is:
Why is X( f() ); optimized away *completly*? Do you have any insight about
PS: I think this discussion might be slightly OT for boost, but it started
here and it will IMHO also influence boost. If you like, we could move it
to clc++m, but as long as no one complains, I'll keep it here...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk