cpp/utility/variant/variant

Constructs a new object.

@1@ Default constructor. Constructs a holding the value-initialized value of the first alternative (index is zero).
 * This constructor is if and only if the value initialization of the alternative type  would satisfy the requirements for a constexpr function.

@2@ Copy constructor. If is not, constructs a  holding the same alternative as  and direct-initializes the contained value with. Otherwise, initializes a valueless_by_exception variant.
 * This constructor is defined as deleted unless is  for all  in.
 * It is trivial if is  for all  in.

@3@ Move constructor. If is not, constructs a  holding the same alternative as  and direct-initializes the contained value with. Otherwise, initializes a variant.
 * It is trivial if is  for all  in.
 * It is trivial if is  for all  in.

@4@ Converting constructor. Constructs a holding 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.

@@Direct-initializes the contained value as if by direct non-list-initialization from.
 * This constructor is a constructor if 's selected constructor is a constexpr constructor.
 * This constructor is a constructor if 's selected constructor is a constexpr constructor.

@5@ Constructs a with the specified alternative  and initializes the contained value with the arguments.
 * If 's selected constructor is a constructor, this constructor is also a  constructor.

@6@ Constructs a with the specified alternative  and initializes the contained value with the arguments.
 * If 's selected constructor is a constructor, this constructor is also a  constructor.

@7@ Constructs a with the alternative  specified by the index  and initializes the contained value with the arguments. @8@ Constructs a with the alternative  specified by the index  and initializes the contained value with the arguments.
 * If 's selected constructor is a constructor, this constructor is also a  constructor.
 * If 's selected constructor is a constructor, this constructor is also a  constructor.

Exceptions
@1@ May throw any exception thrown by the value initialization of the first alternative. @2@ May throw any exception thrown by direct-initializing any in @3@ May throw any exception thrown by move-constructing any  in. @4@ May throw any exception thrown by the initialization of the selected alternative. @5-8@ May throw any exception thrown by calling the selected constructor of the selected alternative.