Closed mpark closed 8 years ago
variant
leaves the target variant
in a corrupted state.variant
returns tuple_not_found
.variant
s simply swaps the states.variant
s. v == w
where both v
and w
are corrupted returns true
, v < w
where both v
and w
are corrupted returns false
. Corrupted variant
s are considered to be greater than uncorrupted ones based on the index.
Suppose
variant<T, U> v;
is corrupted. Shouldvariant<T, U> w(v)
throw abad_variant_access
exception? or shouldw
simply also be corrupted?Suppose
variant<T, U> v, w;
are both corrupted. Shouldswap(v, w)
throw abad_variant_access
exception? or should it be a no-op?The full list of operations that need to be considered: