|
Boost : |
Subject: Re: [boost] [variant] Please vote for behavior
From: Larry Evans (cppljevans_at_[hidden])
Date: 2013-01-30 13:17:14
On 01/30/13 08:55, Larry Evans wrote:
> On 01/30/13 04:58, Antony Polukhin wrote:
> [snip]
>> Now we just need to decide, what a recursive_wrapper is! Is it behave
>> like a reference:
>>
>> // # 1
>> union my_union {
>> my_union& u_;
>> int i_;
>> };
>>
>> Or is it behave like a pointer:
>>
>> // # 2
>> union my_union {
>> unique_ptr<my_union> u_;
>> int i_;
>> };
>>
>> #1 is not what a recursive_wrapper is, because recursive_wrapper OWNS a value
>> #2 is much closer to functionality of recursive_wrapper
>>
> [snip]
> So #2 would be like:
>
> int
> OR
> int*
> OR
> int**
> .
> .
> .
> int********....
>
> Is that right?
>
I think it is based on the output:
vec_us.size()=0
vec_us[0]=
:te[0]=0
vec_us[1]=
:te[0]=1
:te[1]=0
vec_us[2]=
:te[0]=1
:te[1]=1
:te[2]=0
vec_us.size()=3
from the attached.
-regards,
Larry
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk