.TH "__gnu_cxx::pair< _T1, _T2 >" 3 "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME __gnu_cxx::pair< _T1, _T2 > \- Struct holding two objects of arbitrary type\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .SS "Public Types" .in +1c .ti -1c .RI "typedef _T1 \fBfirst_type\fP" .br .RI "The type of the \fRfirst\fP member\&. " .ti -1c .RI "typedef _T2 \fBsecond_type\fP" .br .RI "The type of the \fRsecond\fP member\&. " .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "template, __is_implicitly_default_constructible< _U2 > > ::value, bool >::type = true> constexpr \fBpair\fP ()" .br .ti -1c .RI "template, __not_< is_reference< _U2 > >, is_constructible< _T2, _U2 >, __not_< is_constructible< _T2, const _U2 & > >, is_convertible< _U2, _T2 > >::value, bool > = true> constexpr \fBpair\fP (__zero_as_null_pointer_constant, _U2 &&__y,\&.\&.\&.)" .br .ti -1c .RI "template, __not_< is_reference< _U2 > >, is_constructible< _T2, _U2 >, __not_< is_constructible< _T2, const _U2 & > >, __not_< is_convertible< _U2, _T2 > > >::value, bool > = false> constexpr \fBpair\fP (__zero_as_null_pointer_constant, _U2 &&__y,\&.\&.\&.)" .br .ti -1c .RI "template >, is_pointer< _T2 >, is_constructible< _T1, _U1 >, __not_< is_constructible< _T1, const _U1 & > >, is_convertible< _U1, _T1 > >::value, bool > = true> constexpr \fBpair\fP (_U1 &&__x, __zero_as_null_pointer_constant,\&.\&.\&.)" .br .ti -1c .RI "template >, is_pointer< _T2 >, is_constructible< _T1, _U1 >, __not_< is_constructible< _T1, const _U1 & > >, __not_< is_convertible< _U1, _T1 > > >::value, bool > = false> constexpr \fBpair\fP (_U1 &&__x, __zero_as_null_pointer_constant,\&.\&.\&.)" .br .ti -1c .RI "template() &&_PCCP::template _ImplicitlyMoveConvertiblePair< _U1, _U2 >(), bool >::type = true> constexpr \fBpair\fP (_U1 &&__x, _U2 &&__y)" .br .ti -1c .RI "template() &&!_PCCP::template _ImplicitlyMoveConvertiblePair< _U1, _U2 >(), bool >::type = false> constexpr \fBpair\fP (_U1 &&__x, _U2 &&__y)" .br .ti -1c .RI "template() &&_PCCP::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = true> constexpr \fBpair\fP (const _T1 &__a, const _T2 &__b)" .br .RI "Construct from two const lvalues, allowing implicit conversions\&. " .ti -1c .RI "template() &&!_PCCP::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = false> constexpr \fBpair\fP (const _T1 &__a, const _T2 &__b)" .br .RI "Construct from two const lvalues, disallowing implicit conversions\&. " .ti -1c .RI "constexpr \fBpair\fP (const \fBpair\fP &)=default" .br .RI "Copy constructor\&. " .ti -1c .RI "template::template _ConstructiblePair< _U1, _U2 >() &&_PCCFP< _U1, _U2 >::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = true> constexpr \fBpair\fP (const \fBpair\fP< _U1, _U2 > &__p)" .br .ti -1c .RI "template::template _ConstructiblePair< _U1, _U2 >() &&!_PCCFP< _U1, _U2 >::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = false> constexpr \fBpair\fP (const \fBpair\fP< _U1, _U2 > &__p)" .br .ti -1c .RI "constexpr \fBpair\fP (\fBpair\fP &&)=default" .br .RI "Move constructor\&. " .ti -1c .RI "template::template _MoveConstructiblePair< _U1, _U2 >() &&_PCCFP< _U1, _U2 >::template _ImplicitlyMoveConvertiblePair< _U1, _U2 >(), bool >::type = true> constexpr \fBpair\fP (\fBpair\fP< _U1, _U2 > &&__p)" .br .ti -1c .RI "template::template _MoveConstructiblePair< _U1, _U2 >() &&!_PCCFP< _U1, _U2 >::template _ImplicitlyMoveConvertiblePair< _U1, _U2 >(), bool >::type = false> constexpr \fBpair\fP (\fBpair\fP< _U1, _U2 > &&__p)" .br .ti -1c .RI "template constexpr \fBpair\fP (piecewise_construct_t, tuple< _Args1\&.\&.\&. >, tuple< _Args2\&.\&.\&. >)" .br .ti -1c .RI "\fBpair\fP & \fBoperator=\fP (__conditional_t< __and_< is_copy_assignable< _T1 >, is_copy_assignable< _T2 > >::value, const \fBpair\fP &, const __nonesuch & > __p)" .br .ti -1c .RI "\fBpair\fP & \fBoperator=\fP (__conditional_t< __and_< is_move_assignable< _T1 >, is_move_assignable< _T2 > >::value, \fBpair\fP &&, __nonesuch && > __p) noexcept(__and_< is_nothrow_move_assignable< _T1 >, is_nothrow_move_assignable< _T2 > >::value)" .br .ti -1c .RI "template enable_if< __and_< is_assignable< _T1 &, const_U1 & >, is_assignable< _T2 &, const_U2 & > >::value, \fBpair\fP & >::type \fBoperator=\fP (const \fBpair\fP< _U1, _U2 > &__p)" .br .ti -1c .RI "template enable_if< __and_< is_assignable< _T1 &, _U1 && >, is_assignable< _T2 &, _U2 && > >::value, \fBpair\fP & >::type \fBoperator=\fP (\fBpair\fP< _U1, _U2 > &&__p)" .br .ti -1c .RI "constexpr void \fBswap\fP (\fBpair\fP &__p) noexcept(__and_< __is_nothrow_swappable< _T1 >, __is_nothrow_swappable< _T2 > >::value)" .br .RI "Swap the first members and then the second members\&. " .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "_T1 \fBfirst\fP" .br .RI "The first member\&. " .ti -1c .RI "_T2 \fBsecond\fP" .br .RI "The second member\&. " .in -1c .SS "Related Symbols" (Note that these are not member symbols\&.) .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "template \fBpair\fP (_T1, _T2) \-> \fBpair\fP< _T1, _T2 >" .br .ti -1c .RI "template constexpr enable_if< __and_< __is_swappable< _T1 >, __is_swappable< _T2 > >::value >::type \fBswap\fP (\fBpair\fP< _T1, _T2 > &__x, \fBpair\fP< _T1, _T2 > &__y) noexcept(noexcept(__x\&.swap(__y)))" .br .ti -1c .RI "template constexpr bool \fBoperator==\fP (const \fBpair\fP< _T1, _T2 > &__x, const \fBpair\fP< _T1, _T2 > &__y)" .br .RI "Two pairs of the same type are equal iff their members are equal\&. " .ti -1c .RI "template constexpr bool \fBoperator<\fP (const \fBpair\fP< _T1, _T2 > &__x, const \fBpair\fP< _T1, _T2 > &__y)" .br .ti -1c .RI "template constexpr bool \fBoperator!=\fP (const \fBpair\fP< _T1, _T2 > &__x, const \fBpair\fP< _T1, _T2 > &__y)" .br .RI "Uses \fRoperator==\fP to find the result\&. " .ti -1c .RI "template constexpr bool \fBoperator>\fP (const \fBpair\fP< _T1, _T2 > &__x, const \fBpair\fP< _T1, _T2 > &__y)" .br .RI "Uses \fRoperator<\fP to find the result\&. " .ti -1c .RI "template constexpr bool \fBoperator<=\fP (const \fBpair\fP< _T1, _T2 > &__x, const \fBpair\fP< _T1, _T2 > &__y)" .br .RI "Uses \fRoperator<\fP to find the result\&. " .ti -1c .RI "template constexpr bool \fBoperator>=\fP (const \fBpair\fP< _T1, _T2 > &__x, const \fBpair\fP< _T1, _T2 > &__y)" .br .RI "Uses \fRoperator<\fP to find the result\&. " .in -1c .in -1c .SH "Detailed Description" .PP .SS "template .br struct __gnu_cxx::pair< _T1, _T2 >"Struct holding two objects of arbitrary type\&. .PP \fBTemplate Parameters\fP .RS 4 \fI_T1\fP Type of first object\&. .br \fI_T2\fP Type of second object\&. .RE .PP https://gcc.gnu.org/onlinedocs/libstdc++/manual/utilities.html .SH "Member Typedef Documentation" .PP .SS "template typedef _T1 \fBstd::pair\fP< _T1, _T2 >::first_type" .PP The type of the \fRfirst\fP member\&. .SS "template typedef _T2 \fBstd::pair\fP< _T1, _T2 >::second_type" .PP The type of the \fRsecond\fP member\&. .SH "Constructor & Destructor Documentation" .PP .SS "template \fBstd::pair\fP< _T1, _T2 >::pair (const \fBpair\fP< _T1, _T2 > & )\fR [constexpr]\fP, \fR [default]\fP" .PP Copy constructor\&. .SS "template \fBstd::pair\fP< _T1, _T2 >::pair (\fBpair\fP< _T1, _T2 > && )\fR [constexpr]\fP, \fR [default]\fP" .PP Move constructor\&. .SS "template template, __is_implicitly_default_constructible< _U2 > > ::value, bool >::type = true> \fBstd::pair\fP< _T1, _T2 >::pair ()\fR [inline]\fP, \fR [constexpr]\fP" The default constructor creates \fRfirst\fP and \fRsecond\fP using their respective default constructors\&. .SS "template template() &&_PCCP::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = true> \fBstd::pair\fP< _T1, _T2 >::pair (const _T1 & __a, const _T2 & __b)\fR [inline]\fP, \fR [constexpr]\fP" .PP Construct from two const lvalues, allowing implicit conversions\&. .SS "template template() &&!_PCCP::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = false> \fBstd::pair\fP< _T1, _T2 >::pair (const _T1 & __a, const _T2 & __b)\fR [inline]\fP, \fR [explicit]\fP, \fR [constexpr]\fP" .PP Construct from two const lvalues, disallowing implicit conversions\&. .SH "Member Function Documentation" .PP .SS "template void \fBstd::pair\fP< _T1, _T2 >::swap (\fBpair\fP< _T1, _T2 > & __p)\fR [inline]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP" .PP Swap the first members and then the second members\&. .SH "Member Data Documentation" .PP .SS "template _T1 \fBstd::pair\fP< _T1, _T2 >::first" .PP The first member\&. .SS "template _T2 \fBstd::pair\fP< _T1, _T2 >::second" .PP The second member\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.