
AMDG Emil Dotchevski wrote:
This still doesn't mean that it is desirable for operator= to be allowed to change the type of the stored object.
In other words, you /are/ advocating the strong guarantee.
If you list boost::blank as a valid variant, then there's nothing unusual about this state. The difference in meaning is subtle but nevertheless important: it's similar to a pointer that may legally be null, requiring the user to deal with this possibility, vs. a pointer which can never be null, allowing the user to assert when it is.
I don't follow. IMO, unless you are making the exact variant type part of your class' public interface, it is irrelevant how you represent an empty variant. The only difference with adding boost::blank vs. creating some empty state, is that the presence of the empty state is explicit. In Christ, Steven Watanabe