Subject: Re: [boost] An extension to boost::variant
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-02-09 21:45:08


AMDG

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,
> obviously.
>

Just forbid default construction in this case. It isn't very hard.

In Christ,
Steven Watanabe