|
Boost : |
Subject: Re: [boost] [variant] Please vote for behavior
From: Larry Evans (cppljevans_at_[hidden])
Date: 2013-01-30 09:55:23
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?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk