|
Boost : |
Subject: Re: [boost] An extension to boost::variant
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-02-09 13:42:27
Chris Hamilton wrote:
> boost::variant
> currently can not handle the following code:
> [...]
> boost::variant<foo*,foo&> v;
> [...]
> My question is essentially this: why couldn't it?
I suppose it requires the types to be value types, otherwise assignment
and copy don't make sense.
It's just like containers really. What's wrong with using T* or
reference_wrapper<T> instead of T&?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk