Assignment operators

Synopses

Declared in <bslstl_pair.h>

Assign to this pair from the specified rhs pair, holding the parameterized types PARAM_1 and PARAM_2, and return a reference offering modifiable access to this object. Assign first the value in rhs.first and second the value in rhs.second. Attempted use of this assignment operator will not compile unless both T1 and T2 supply assignment operators, and T1 is assignable from PARAM_1 and T2 is assignable from PARAM_2.

template<
    class PARAM_1,
    class PARAM_2,
    class = void>
requires std::is_assignable<T1&, const PARAM_1>::value
                                    && std::is_assignable<T2&, const PARAM_2>::value
constexpr
pair<T1, T2>&
operator=(pair<PARAM_1, PARAM_2> const& rhs);

Assign to this pair the value of the specified rhs pair, holding first and second values of (template parameter) type PARAM_1 and PARAM_2 respectively, and return a reference providing modifiable access to this object. This method requires that T1 be assignable from PARAM_1 and T2 be assignable from PARAM_2.

template<
    class PARAM_1,
    class PARAM_2>
constexpr
pair<T1, T2>&
operator=(pair<PARAM_1, PARAM_2>&& rhs);

Assign to this pair from the specified rhs pair, where the type rhs is the pair type native to the compiler's library, holding the parameterized types PARAM_1 and PARAM_2, and return a reference offering modifiable access to this object. Assign first the value in rhs.first and second the value in rhs.second. Attempted use of this assignment operator will not compile unless both T1 and T2 supply assignment operators, and T1 is assignable from PARAM_1 and T2 is assignable from PARAM_2.

template<
    class PARAM_1,
    class PARAM_2>
constexpr
pair<T1, T2>&
operator=(std::pair<PARAM_1, PARAM_2> const& rhs);

Created with MrDocs