|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2002-10-25 10:49:28
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.
> And does this mean that the GCC 3.1+ is actually optimizing things
> it shouldn't? (I don't hope so...)
No.
-- David Abrahams dave_at_[hidden] * http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk