From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-07-21 08:15:54
On Sunday 21 July 2002 07:43 am, Itay Maman wrote:
> > extract<T> can be added at any time, so it might as well come along with
> > variant.
> This brings me to this point: The variant equivalent of any_cast<>, i.e:
> variant_cast<>, has been renamed to boost::extract<>. This reduces the
> level of compatibility with boost::any even further. Given this, shouldn't
> we drop variant::empty() ?
I think that 'extract' was meant as a general mechanism, so it would work with
boost::any also. So the correspondence between boost::any and variant would
be 'close': bounded uses of boost::any could be replaced by variant by:
1) Replacing the boost::any type with the appropriate variant instantiation
2) Replacing 'any_cast' with 'extract'
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk