__gnu_cxx::pair< _T1, _T2 >(3cxx)

NAME
__gnu_cxx::pair< _T1, _T2 > - Struct holding two objects of arbitrary type.

SYNOPSIS

#include <stl_pair.h>

Inherited by std::sub_match< const char * >, std::sub_match< string::const_iterator >, std::sub_match< const wchar_t * >, std::sub_match< wstring::const_iterator >, and std::sub_match< _Bi_iter >.

  Public Types

typedef _T1 first_type
The type of the first member.
typedef _T2 second_type
The type of the second member.

  Public Member Functions

template<typename _U1 = _T1, typename _U2 = _T2, typename enable_if< __and_< __is_implicitly_default_constructible< _U1 >, __is_implicitly_default_constructible< _U2 > > ::value, bool >::type = true> constexpr pair ()
template<typename _U1, typename _U2, typename enable_if< _PCCP::template _MoveConstructiblePair< _U1, _U2 >() &&!_PCCP::template _ImplicitlyMoveConvertiblePair< _U1, _U2 >(), bool >::type = false> constexpr pair (_U1 &&__x, _U2 &&__y)
template<typename _U1, typename _U2, typename enable_if< _PCCP::template _MoveConstructiblePair< _U1, _U2 >() &&_PCCP::template _ImplicitlyMoveConvertiblePair< _U1, _U2 >(), bool >::type = true> constexpr pair (_U1 &&__x, _U2 &&__y)
template<typename _U1, typename enable_if< _PCCP::template _MoveCopyPair< false, _U1, _T2 >(), bool >::type = false> constexpr pair (_U1 &&__x, const _T2 &__y)
template<typename _U1, typename enable_if< _PCCP::template _MoveCopyPair< true, _U1, _T2 >(), bool >::type = true> constexpr pair (_U1 &&__x, const _T2 &__y)
template<typename _U1 = _T1, typename _U2 = _T2, typename enable_if< _PCCP::template _ConstructiblePair< _U1, _U2 >() &&!_PCCP::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = false> constexpr pair (const _T1 &__a, const _T2 &__b)
Construct from two const lvalues, disallowing implicit conversions.
template<typename _U1 = _T1, typename _U2 = _T2, typename enable_if< _PCCP::template _ConstructiblePair< _U1, _U2 >() &&_PCCP::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = true> constexpr pair (const _T1 &__a, const _T2 &__b)
Construct from two const lvalues, allowing implicit conversions.
template<typename _U2, typename enable_if< _PCCP::template _CopyMovePair< false, _T1, _U2 >(), bool >::type = false> pair (const _T1 &__x, _U2 &&__y)
template<typename _U2, typename enable_if< _PCCP::template _CopyMovePair< true, _T1, _U2 >(), bool >::type = true> constexpr pair (const _T1 &__x, _U2 &&__y)
constexpr pair (const pair &)=default
Copy constructor.
template<typename _U1, typename _U2, typename enable_if< _PCCFP< _U1, _U2 >::template _ConstructiblePair< _U1, _U2 >() &&!_PCCFP< _U1, _U2 >::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = false> constexpr pair (const pair< _U1, _U2 > &__p)
template<typename _U1, typename _U2, typename enable_if< _PCCFP< _U1, _U2 >::template _ConstructiblePair< _U1, _U2 >() &&_PCCFP< _U1, _U2 >::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = true> constexpr pair (const pair< _U1, _U2 > &__p)
constexpr pair (pair &&)=default
Move constructor.
template<typename _U1, typename _U2, typename enable_if< _PCCFP< _U1, _U2 >::template _MoveConstructiblePair< _U1, _U2 >() &&!_PCCFP< _U1, _U2 >::template _ImplicitlyMoveConvertiblePair< _U1, _U2 >(), bool >::type = false> constexpr pair (pair< _U1, _U2 > &&__p)
template<typename _U1, typename _U2, typename enable_if< _PCCFP< _U1, _U2 >::template _MoveConstructiblePair< _U1, _U2 >() &&_PCCFP< _U1, _U2 >::template _ImplicitlyMoveConvertiblePair< _U1, _U2 >(), bool >::type = true> constexpr pair (pair< _U1, _U2 > &&__p)
template<typename... _Args1, typename... _Args2> constexpr pair (piecewise_construct_t, tuple< _Args1... >, tuple< _Args2... >)
template<typename _U1, typename _U2> constexpr enable_if< __and_< is_assignable< _T1 &, const_U1 & >, is_assignable< _T2 &, const_U2 & > >::value, pair & >::type operator= (const pair< _U1, _U2 > &__p)
template<typename _U1, typename _U2> constexpr enable_if< __and_< is_assignable< _T1 &, _U1 && >, is_assignable< _T2 &, _U2 && > >::value, pair & >::type operator= (pair< _U1, _U2 > &&__p)
constexpr pair & operator= (typename conditional< __and_< is_copy_assignable< _T1 >, is_copy_assignable< _T2 > >::value, const pair &, const __nonesuch & >::type __p)
constexpr pair & operator= (typename conditional< __and_< is_move_assignable< _T1 >, is_move_assignable< _T2 > >::value, pair &&, __nonesuch && >::type __p) noexcept(__and_< is_nothrow_move_assignable< _T1 >, is_nothrow_move_assignable< _T2 > >::value)
constexpr void swap (pair &__p) noexcept(__and_< __is_nothrow_swappable< _T1 >, __is_nothrow_swappable< _T2 > >::value)
Swap the first members and then the second members.

  Public Attributes

_T1 first
The first member.
_T2 second
The second member.

  Related Symbols
(Note that these are not member symbols.)

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)))
template<typename _T1, typename _T2> constexpr bool operator== (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
Two pairs of the same type are equal iff their members are equal.
template<typename _T1, typename _T2> constexpr bool operator< (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
template<typename _T1, typename _T2> constexpr bool operator!= (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
Uses operator== to find the result.
template<typename _T1, typename _T2> constexpr bool operator> (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
Uses operator< to find the result.
template<typename _T1, typename _T2> constexpr bool operator<= (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
Uses operator< to find the result.
template<typename _T1, typename _T2> constexpr bool operator>= (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
Uses operator< to find the result.

Detailed Description

  template<typename _T1, typename _T2>
struct __gnu_cxx::pair< _T1, _T2 >"Struct holding two objects of arbitrary type.

Template Parameters
    _T1 Type of first object.
    _T2 Type of second object.

https://gcc.gnu.org/onlinedocs/libstdc++/manual/utilities.html

Member Typedef Documentation

  template<typename _T1, typename _T2> typedef _T1 std::pair< _T1, _T2 >::first_type

The type of the first member.

  template<typename _T1, typename _T2> typedef _T2 std::pair< _T1, _T2 >::second_type

The type of the second member.

Constructor & Destructor Documentation

  template<typename _T1, typename _T2> template<typename _U1 = _T1, typename _U2 = _T2, typename enable_if< __and_< __is_implicitly_default_constructible< _U1 >, __is_implicitly_default_constructible< _U2 > > ::value, bool >::type = true> std::pair< _T1, _T2 >::pair () [inline], [constexpr]
The default constructor creates first and second using their respective default constructors.

  template<typename _T1, typename _T2> template<typename _U1 = _T1, typename _U2 = _T2, typename enable_if< _PCCP::template _ConstructiblePair< _U1, _U2 >() &&_PCCP::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = true> std::pair< _T1, _T2 >::pair (const _T1 & __a, const _T2 & __b) [inline], [constexpr]

Construct from two const lvalues, allowing implicit conversions.

  template<typename _T1, typename _T2> template<typename _U1 = _T1, typename _U2 = _T2, typename enable_if< _PCCP::template _ConstructiblePair< _U1, _U2 >() &&!_PCCP::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = false> std::pair< _T1, _T2 >::pair (const _T1 & __a, const _T2 & __b) [inline], [explicit], [constexpr]

Construct from two const lvalues, disallowing implicit conversions.

  template<typename _T1, typename _T2> std::pair< _T1, _T2 >::pair (const pair< _T1, _T2 > & ) [constexpr], [default]

Copy constructor.

  template<typename _T1, typename _T2> std::pair< _T1, _T2 >::pair (pair< _T1, _T2 > && ) [constexpr], [default]

Move constructor.

Member Function Documentation

  template<typename _T1, typename _T2> void std::pair< _T1, _T2 >::swap (pair< _T1, _T2 > & __p) [inline], [constexpr], [noexcept]

Swap the first members and then the second members.

Member Data Documentation

  template<typename _T1, typename _T2> _T1 std::pair< _T1, _T2 >::first

The first member.

  template<typename _T1, typename _T2> _T2 std::pair< _T1, _T2 >::second

The second member.

Author

Generated automatically by Doxygen for libstdc++ from the source code.