Subject: Re: [boost] An extension to boost::variant
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-02-09 21:45:08
Chris Hamilton wrote:
> Caveat: There would be a small violation to the "Never Empty Guarantee"
> if a reference was the first templated type and the variant was default
> constructed; in this case, it would be default constructible (as
> internally it would be stored using a pointer), but the pointer would
> have a null value. Trying to use this value would cause an error,
Just forbid default construction in this case. It isn't very hard.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk