Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-02-20 09:24:12


"Peter Dimov" <pdimov_at_[hidden]> writes:

> David Abrahams wrote:
>> Brian McNamara <lorgon_at_[hidden]> writes:
>>
>>> One other quick note: throughout this message, I am abusing
>>> terminology, and use "by value" to mean either by-value or by-const-&
>>
>> Unfortunately, at least until 8.5.3/5 is reworded, those are not
>> equivalent for some types :(
>>
>> See std::auto_ptr.
>>
>> Yeah, I know, types like that are anathema in FP ;-)
>> Still, they exist in the real world of C++.
>
> Pass by value and pass by const reference have different semantics for
> std::auto_ptr regardless of 8.5.3/5.

True. I guess my move semantics example shows a case where they don't
have different semantics, yet 8.5.3/5 thwarts their syntactic
equivalence.

-- 
Dave Abrahams
Boost Consulting
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