Boost logo

Boost :

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
> optional.

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.

Regards, Daniel

Boost list run by bdawes at, gregod at, cpdaniel at, john at