Boost logo

Boost :

From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2003-10-28 14:50:03


"Eric Friedman" <ebf_at_[hidden]> escribió en el mensaje
news:bnmgea$f8q$1_at_sea.gmane.org...
> Anthony Williams wrote:
>
> > Eric Friedman <ebf_at_[hidden]> writes:
> >>Over the past few days, I've thought of implementing const_variant,
which
> >>would provide the same interface as variant (indeed, variant would be
likely
> >>implemented in terms of const_variant). However, as const_variant would
not
> >>allow assignment, it would not have to deal with any of the
double-storage,
> >>temporary heap backup, etc. solutions.
> >
> >
> > Probably useful. Just to confirm --- the constness of const_variant
refers to
> > the fact that it contains the same (non-const) object for its whole
lifetime,
> > not that it contains a const object, right?
>
> Yes, the content type would be immutable, while the content would be
> mutable (unless const-qualified).
>
> A better name might be fixed_variant.
>
yea, I like this better.

Fernando Cacciola


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk