|
libstdc++
|
Inherits __pair_base< _T1, _T2 >.
Public Types | |
| typedef _T1 | first_type |
| typedef _T2 | second_type |
Public Member Functions | |
| constexpr | pair (const pair &)=default |
| constexpr | pair (pair &&)=default |
| template<typename... _Args1, typename... _Args2> | |
| constexpr | pair (piecewise_construct_t, tuple< _Args1... >, tuple< _Args2... >) |
| _U2 const _U2 & | pair (const pair< _U1, _U2 > &__p) noexcept(_S_nothrow_constructible< const _U1 &, const _U2 &>()) |
| constexpr pair | _T2 ()) |
| _U2 ()) const expr explicit(!_S_convertible< _U1 | |
| _U2 ()) pair(_U1 &&__x | |
| _U2 ()) const expr explicit(!_S_convertible< _U1 | |
| _U2 ()) pair(_U1 && | |
| _U2 | _U2 ()) const expr explicit(!_S_convertible< const _U1 & |
| const _U2 &constexpr _U2 | _U2 ()) const expr explicit(!_S_convertible< _U1 |
| const _U2 &constexpr _U2 | _U2 ()) pair(pair< _U1 |
| _U2 ()) const expr explicit(!_S_convertible< _U1 | |
| _U2 ()) pair(pair< _U1 | |
| constexpr pair | _U2 ()) |
| constexpr | explicit (__not_< __and_< __is_implicitly_default_constructible< _T1 >, __is_implicitly_default_constructible< _T2 >>>()) pair() noexcept(is_nothrow_default_constructible_v< _T1 > &&is_nothrow_default_constructible_v< _T2 >) requires is_default_constructible_v< _T1 > &&is_default_constructible_v< _T2 > |
| constexpr | explicit (!_S_convertible< const _T1 &, const _T2 &>()) pair(const type_identity_t< _T1 > &__x |
| const _U2 &constexpr | explicit (!_S_convertible< const _U1 &, const _U2 &>()) pair(const pair< _U1 |
| constexpr const _T2 &__y | noexcept (_S_nothrow_constructible< const _T1 &, const _T2 &>()) requires(_S_constructible< const _T1 & |
| _U2 &&__y | noexcept (_S_nothrow_constructible< _U1, _U2 >()) |
| const _U2 &constexpr _U2 _U2 &&__p | noexcept (_S_nothrow_constructible< _U1, _U2 >()) |
| pair & | operator= (const pair &)=delete |
| constexpr pair & | operator= (const pair &__p) noexcept(_S_nothrow_assignable< const _T1 &, const _T2 &>()) requires(_S_assignable< const _T1 & |
| constexpr pair & | operator= (pair &&__p) noexcept(_S_nothrow_assignable< _T1, _T2 >()) requires(_S_assignable< _T1 |
| template<typename _U1 , typename _U2 > | |
| constexpr pair & | operator= (const pair< _U1, _U2 > &__p) noexcept(_S_nothrow_assignable< const _U1 &, const _U2 &>()) requires(_S_assignable< const _U1 & |
| template<typename _U1 , typename _U2 > | |
| constexpr pair & | operator= (pair< _U1, _U2 > &&__p) noexcept(_S_nothrow_assignable< _U1, _U2 >()) requires(_S_assignable< _U1 |
| template<typename _U1 , typename _U2 > | |
| requires (_S_constructible< _U1, _U2 >()) &&(!_S_dangles< _U1 | |
| template<typename _U1 , typename _U2 > | |
| requires (_S_constructible< _U1, _U2 >()) &&(_S_dangles< _U1 | |
| template<typename _U1 , typename _U2 > | |
| _U2 && | requires (_S_constructible< const _U1 &, const _U2 &>()) &&(!_S_dangles< _U1 |
| template<typename _U1 , typename _U2 > | |
| requires (_S_constructible< const _U1 &, const _U2 &>()) &&(_S_dangles< const _U1 & | |
| template<typename _U1 , typename _U2 > | |
| const _U2 &constexpr _U2 & | requires (_S_constructible< _U1, _U2 >()) &&(!_S_dangles< _U1 |
| template<typename _U1 , typename _U2 > | |
| requires (_S_constructible< _U1, _U2 >()) &&(_S_dangles< _U1 | |
| constexpr const _T2 &__y const _T2 | second (__y) |
| constexpr void | swap (pair &__p) noexcept(__and_< __is_nothrow_swappable< _T1 >, __is_nothrow_swappable< _T2 >>::value) |
Public Attributes | |
| _T1 | first |
| _T2 | second |
| constexpr pair const _T2 & | second |
| constexpr pair const _U2 & | second |
| return * | this |
Related Functions | |
(Note that these are not member functions.) | |
| template<typename _T1 , typename _T2 > | |
| constexpr pair< typename __decay_and_strip< _T1 >::__type, typename __decay_and_strip< _T2 >::__type > | make_pair (_T1 &&__x, _T2 &&__y) |
| template<typename _T1 , typename _T2 > | |
| pair (_T1, _T2) -> pair< _T1, _T2 > | |
| template<typename _T1 , typename _T2 , typename _U1 , typename _U2 > | |
| constexpr bool | operator== (const pair< _T1, _T2 > &__x, const pair< _U1, _U2 > &__y) requires requires |
| template<typename _T1 , typename _T2 , typename _U1 , typename _U2 > | |
| constexpr common_comparison_category_t< __detail::__synth3way_t< _T1, _U1 >, __detail::__synth3way_t< _T2, _U2 > > | operator (const pair< _T1, _T2 > &__x, const pair< _U1, _U2 > &__y) |
| template<typename _T1 , typename _T2 > | |
| constexpr enable_if< __and_< __is_swappable< _T1 >, __is_swappable< _T2 > >::value >::type | swap (pair< _T1, _T2 > &__x, pair< _T1, _T2 > &__y) noexcept(noexcept(__x.swap(__y))) |
Struct holding two objects of arbitrary type.
| _T1 | Type of first object. |
| _T2 | Type of second object. |
https://gcc.gnu.org/onlinedocs/libstdc++/manual/utilities.html
Definition at line 3122 of file bits/stl_iterator.h.
| typedef _T1 std::pair< _T1, _T2 >::first_type |
The type of the first member.
Definition at line 305 of file stl_pair.h.
| typedef _T2 std::pair< _T1, _T2 >::second_type |
The type of the second member.
Definition at line 306 of file stl_pair.h.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inlinenoexcept |
Default constructor.
Definition at line 362 of file stl_pair.h.
| constexpr std::pair< _T1, _T2 >::explicit | ( | !_S_convertible< const _T1 &, const _T2 & > | () | ) | const & |
Constructor accepting lvalues of first_type and second_type
|
noexcept |
Copy assignment operator.
|
noexcept |
Move assignment operator.
|
noexcept |
Converting assignment from a const pair<U1, U2> lvalue.
|
noexcept |
Converting assignment from a non-const pair<U1, U2> rvalue.
| std::pair< _T1, _T2 >::requires | ( | _S_constructible< _U1, _U2 > | () | ) | && |
Constructor accepting two values of arbitrary types.
| _U2&& std::pair< _T1, _T2 >::requires | ( | _S_constructible< const _U1 &, const _U2 & > | () | ) | && |
Converting constructor from a const pair<U1, U2> lvalue.
| const _U2& constexpr _U2& std::pair< _T1, _T2 >::requires | ( | _S_constructible< _U1, _U2 > | () | ) | && |
Converting constructor from a non-const pair<U1, U2> rvalue.
|
inlinenoexcept |
Swap the first members and then the second members.
Definition at line 321 of file stl_pair.h.
Referenced by std::sub_match< _Bi_iter >::swap(), and std::pair< entry_pointer, typename _Alloc::size_type >::swap().
| _T1 std::pair< _T1, _T2 >::first |
The first member.
Definition at line 308 of file stl_pair.h.
Referenced by __gnu_debug::__check_singular(), std::__sample(), std::set< _Key, _Compare, _Alloc >::insert(), std::pair< entry_pointer, typename _Alloc::size_type >::operator(), and std::pair< entry_pointer, typename _Alloc::size_type >::swap().
| _T2 std::pair< _T1, _T2 >::second |
The second member.
Definition at line 309 of file stl_pair.h.
Referenced by __gnu_debug::__check_singular(), std::__sample(), std::set< _Key, _Compare, _Alloc >::insert(), std::pair< entry_pointer, typename _Alloc::size_type >::operator(), and std::pair< entry_pointer, typename _Alloc::size_type >::swap().