From: Daniel Frey (d.frey_at_[hidden])
Date: 2002-10-25 19:29:03
On Fri, 25 Oct 2002 17:49:28 +0200, David Abrahams wrote:
> Daniel Frey <d.frey_at_[hidden]> writes:
>> 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?
> There was no argumentation, except on my part regarding what would be
> obvious to users. We all understood that both optimizations were
I can understand that, but although it's optional, it's still surprising
to see it's not implemented. What I can keep in mind as a summary is, that
for EDG-based compilers 'X x = f();' is more efficient than 'X x( f() );',
for all other compilers it's equally good or bad. Thanks to all for the
testing and discussion.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk