"Peter Dimov" <[EMAIL PROTECTED]> writes:
> From: "Fernando Cacciola" <[EMAIL PROTECTED]>
> [...]
>> (1) deep-constantness:
>>
>> I Followed David Abraham's suggestion and decoupled
>> constantness of the optional<> object with that of
>> the value being wrapped.
>> This is how pointers and most smart pointers work, so
>> the pointer semantic should suffice to explain this behaviour.
>
> Hm. Did Dave really suggest that? :-)
Not exactly. I said that deep constness is inconsistent with a
pointer-oriented interface.
> To reiterate, my opinion is that deep constness is much more
> appropriate for optional<>. Constness and copying go hand in hand:
> deep copy corresponds to deep constness, and shallow copy
> corresponds to shallow constness. Optional<> does a deep copy. Even
> smart pointers that do deep copy use deep const.
Oh, well yeah. There are some smart pointers that do that. I've
never touched one. So maybe a "deep" optional with a smart pointer
interface is not such an odd beast.
--
David Abrahams
[EMAIL PROTECTED] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost