That is actually the one thing I have written, twice, once in the README and one in the Overview section of the documentation. :-)
"To avoid going into a valueless-by-exception state, this implementation falls back to using double storage unless
* one of the alternatives is the type monostate, * one of the alternatives has a nonthrowing default constructor, or * all the contained types are nothrow move constructible."
So, yes, variant will be double-buffered, but variant
and variant won't be.
Could we have instead then the following more elemental variants:
1. single_buffered_variant<...>: Never enters a trap state (where
valueless_on_exception() = true). Always single buffered. Requires at
least one state to have a nothrow default constructor, or all states to
have nothrow move constructors.
2. double_buffered_variant<...>: Never enters a trap state (where
valueless_on_exception() = true). Always double buffered. Always
implements the strong exception guarantee.
I would prefer this design because Boost users are more than capable of
writing a std::conditional_t<> which chooses what the variant
implementation is, based on input types e.g.
template