cpp/utility/variant/operator=

Assigns a new value to an existing object.

@1@ Copy-assignment: @@ This overload is defined as deleted unless and  are both  for all  in. This overload is trivial if, and are all  for all  in. @2@ Move-assignment: @@ . This overload is trivial if, , and are all  for all  in. @3@ Converting assignment.
 * If both and  are valueless by exception, does nothing.
 * Otherwise, if is valueless, but  is not, destroys the value contained in  and makes it valueless.
 * Otherwise, if holds the same alternative as, assigns the value contained in  to the value contained in . If an exception is thrown,  does not become valueless: the value depends on the exception safety guarantee of the alternative's copy assignment.
 * Otherwise, if the alternative held by is either nothrow copy constructible or not nothrow move constructible (as determined by std and std, respectively), equivalent to .  may become  if an exception is thrown on the copy-construction inside.
 * Otherwise, equivalent to.
 * If both and  are valueless by exception, does nothing
 * Otherwise, if is valueless, but  is not, destroys the value contained in  and makes it valueless
 * Otherwise, if holds the same alternative as, assigns  to the value contained in , with  being . If an exception is thrown,  does not become valueless: the value depends on the exception safety guarantee of the alternative's move assignment.
 * Otherwise (if and  hold different alternatives), equivalent to . If an exception is thrown by 's move constructor,  becomes.
 * Determines the alternative type that would be selected by overload resolution for the expression  if there was an overload of imaginary function  for every  from  in scope at the same time, except that:
 * An overload is only considered if the declaration  is valid for some invented variable ;

.
 * If already holds a, assigns  to the value contained in . If an exception is thrown,  does not become valueless: the value depends on the exception safety guarantee of the assignment called.
 * Otherwise, if is, equivalent to .  may become  if an exception is thrown on the initialization inside.
 * Otherwise, equivalent to.

Exceptions
@1@ May throw any exception thrown by assignment and copy/move initialization of any alternative. @2@ @3@