Boost logo

Boost :

Subject: Re: [boost] [variant] Please vote for behavior
From: Joel de Guzman (djowel_at_[hidden])
Date: 2013-01-28 16:47:12


On 1/29/13 5:06 AM, Gottlob Frege wrote:
> On Mon, Jan 28, 2013 at 1:35 PM, Joel de Guzman <djowel_at_[hidden]> wrote
>>
>>
> No. It's still just operator(T const&). You can't use a "singular
>> valued" recursive_wrapper in any other operation apart from assignment,
>> destruction or move.
>>
>
>
> How do I know if is it singular valued?

How do you know if an iterator is singular valued? You can't. Same here.

  Do I need to check everywhere?

No, you don't have to. You don't need to.

> Basically, can you guarantee the never "leak out" and are destroyed or
> assigned immediately after the move?

No, you can't guarantee that, and you don't disallow that. But likewise,
neither can you guarantee that a singular valued iterator leaks
out into the wild.

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