|
Boost : |
Subject: Re: [boost] [variant] Please vote for behavior
From: Joel de Guzman (djowel_at_[hidden])
Date: 2013-01-28 13:27:06
On 1/29/13 1:40 AM, Paul Smith wrote:
>> I am also
>> >not convinced that drawing from objects with "singular" values is wrong,
>> >regardless if it's a pointer or not. I think it is you who's missing
>> >the point because Iterators are likewise*not* pointers.
> Okay, so replace "recursive_wrappers are not pointers" with
> "recursive_wrappers are not iterators". How does it make it any
> different? A singular value still doesn't fit in.
The point is that iterators can have singular values. If iterators
can have them, why can't any other object (have them)? IMO, ultimately,
it's a matter of design. You may not agree with a recursive_wrapper
being in a "singular" state after move, but that's just your preference.
IMO, it's necessary for proxy-like objects that own and hold their
subjects by pointer. It's not quite elegant, sure, but C++ is never
elegant in many respects for the sake of high performance. I'd trade
this quirk for the sake of efficiency any day.
Regards,
-- Joel de Guzman http://www.boostpro.com http://boost-spirit.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk