cpp/utility/expected/expected

Constructs a new object.

@1@ Default constructor. If is not (possibly cv-qualified), constructs an object that contains an expected value, which is value-initialized. After construction, returns.

@2@ Copy constructor. If is, the new object contains an unexpected value, which is direct-initialized from. Otherwise, if is not (possibly cv-qualified), the new object contains an expected value, which is direct-initialized from. After construction, is equal to.
 * This constructor is defined as deleted unless
 * either is (possibly cv-qualified), or  is , and
 * is.
 * This constructor is trivial if
 * either is (possibly cv-qualified), or  is , and
 * is.

@3@ Move constructor. If is, the new object contains an unexpected value, which is direct-initialized from. Otherwise, if is not (possibly cv-qualified), the new object contains an expected value, which is direct-initialized from. After construction, is equal to.
 * This constructor participates in overload resolution only if
 * either is (possibly cv-qualified), or  is , and
 * is.
 * This constructor is trivial if
 * is, and
 * is.

@4,5@ Let
 * be for  and  for, and
 * be for  and  for.

If is, the new object contains an unexpected value, which is direct-initialized from. Otherwise, if is not (possibly cv-qualified), the new object contains an expected value, which is direct-initialized from. After construction, is equal to.
 * Each of these constructors does not participate in overload resolution unless the following conditions are met respectively:
 * Either
 * is (possibly cv-qualified), and is , or
 * is.
 * is.
 * If is not (possibly cv-qualified ),  is not constructible or convertible from any expression of type (possibly ), i.e., the following 8 values are all :
 * is not constructible from any expression of type (possibly ), i.e., the following 4 values are all :
 * These constructors are if  or  is.
 * is not constructible from any expression of type (possibly ), i.e., the following 4 values are all :
 * These constructors are if  or  is.
 * is not constructible from any expression of type (possibly ), i.e., the following 4 values are all :
 * These constructors are if  or  is.
 * is not constructible from any expression of type (possibly ), i.e., the following 4 values are all :
 * These constructors are if  or  is.
 * is not constructible from any expression of type (possibly ), i.e., the following 4 values are all :
 * These constructors are if  or  is.
 * These constructors are if  or  is.
 * These constructors are if  or  is.
 * These constructors are if  or  is.
 * These constructors are if  or  is.

@6@ Constructs an object that contains an expected value, initialized as if direct-initializing (but not direct-list-initializing) an object of type with the expression. After construction, returns.
 * This constructor does not participate in overload resolution unless the following conditions are met:
 * is not (possibly cv-qualified).
 * is.
 * is.
 * is.
 * is not a specialization of.
 * If is (possibly cv-qualified),  is not a specialization of.

@7,8@ Let be  for  and  for. Constructs an object that contains an unexpected value, which is direct-initialized from. After construction, returns.

@9@ Constructs an object that contains an expected value, which is direct-initialized from the arguments. After construction, returns.

@10@ Constructs an object that contains an expected value, which is direct-initialized from the arguments. After construction, returns.

@11@ Constructs an object such that after construction, returns.

@12@ Constructs an object that contains an unexpected value, which is direct-initialized from the arguments. After construction, returns.

@13@ Constructs an object that contains an unexpected value, which is direct-initialized from the arguments. After construction, returns.

Exceptions
@1@ Throws any exception thrown by the constructor of. If is (possibly cv-qualified) ,

@2@ Throws any exception thrown by the constructor of or.

@3@ If is (possibly cv-qualified) ,

Otherwise,

@4,5@ Throws any exception thrown by the constructor of or.

@6@ Throws any exception thrown by the constructor of.

@7,8@ Throws any exception thrown by the constructor of.

@9,10@ Throws any exception thrown by the constructor of.

@12,13@ Throws any exception thrown by the constructor of.