From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-02-11 13:03:44
David Abrahams wrote:
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>> David Abrahams wrote:
>>> "Peter Dimov" <pdimov_at_[hidden]> writes:
>>>> The compiler is allowed to elide a temporary created by a copy
>>>> The compiler is _not_ allowed to elide a temporary created by some
>>>> other constructor, because this changes observable behavior and is
>>>> not explicitly allowed.
>>> I think what's explicitly allowed depends on your reading of 8.5.3/5
>> No, the relevant portion here is 12.8/15.
> 1. Do you realize that 12.8/15 was almost completely rewritten by
> Core issue 20?
No, I did not, thanks for the pointer. No relevant changes, though. Only
copy constructors can be optimized out.
> 2. I still think it's arguable that 8.5.3/5 does not require a copy
> constructor to be used in my example, making 12.8/15 irrelevant
Well, I suppose that you could argue that if you like, but does it help your
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk