20 General utilities library [utilities]

20.3 Pairs [pairs]

20.3.4 Tuple-like access to pair [pair.astuple]

tuple_size<pair<T1, T2> >::value

Returns: Integral constant expression.

Value: 2.

tuple_element<0, pair<T1, T2> >::type

Value: the type T1.

tuple_element<1, pair<T1, T2> >::type

Value: the type T2.

template<size_t I, class T1, class T2> typename tuple_element<I, std::pair<T1, T2> >::type& get(pair<T1, T2>&) noexcept; template<size_t I, class T1, class T2> const typename tuple_element<I, std::pair<T1, T2> >::type& get(const pair<T1, T2>&) noexcept;

Returns: If I == 0 returns p.first; if I == 1 returns p.second; otherwise the program is ill-formed.

template<size_t I, class T1, class T2> typename tuple_element<I, std::pair<T1, T2> >::type&& get(std::pair<T1, T2>&&) noexcept;

Returns: If I == 0 returns std::forward<T1&&>(p.first); if I == 1 returns std::forward<T2&&>(p.second); otherwise the program is ill-formed.