There are three preprocessor defines that strict_variant
responds to:
STRICT_VARIANT_ASSUME_MOVE_NOTHROW
noexcept
status. This
might be useful if you are using old versions of the standard library
and things like std::string
are not no-throw move constructible
for you, but you want strict_variant::variant
to act as though they are. This will allow you to get assignment operators
for the variant as though everything were move constructible, but if
anything actually does throw you get UB.
STRICT_VARIANT_ASSUME_COPY_NOTHROW
noexcept
status. This
is pretty dangerous, it only makes sense in a few situations that I can
think of:
-fno-exceptions
and a custom allocator, which you monitor on the side for memory
exhaustion, or something like this.
STRICT_VARIANT_DEBUG