.TH "std::pair< _T1, _T2 >" 3cxx "Sun Feb 7 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::pair< _T1, _T2 > \- Struct holding two objects of arbitrary type\&. .SH SYNOPSIS .br .PP .PP Inherits std::__pair_base< _U1, _U2 >\&. .SS "Public Types" .in +1c .ti -1c .RI "template using \fB_PCCFP\fP = _PCC::value||!\fBis_same\fP< _T2, _U2 >::value, _T1, _T2 >" .br .ti -1c .RI "using \fB_PCCP\fP = _PCC< true, _T1, _T2 >" .br .ti -1c .RI "typedef _T1 \fBfirst_type\fP" .br .ti -1c .RI "typedef _T2 \fBsecond_type\fP" .br .RI "\fCfirst_type\fP is the first bound type " .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 .RI "\fCsecond\fP is a copy of the second object " .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(), bool >::type = true> constexpr \fBpair\fP (_U1 &&__x, const _T2 &__y)" .br .ti -1c .RI "template(), bool >::type = false> constexpr \fBpair\fP (_U1 &&__x, const _T2 &__y)" .br .ti -1c .RI "template() &&_PCCP::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = true> constexpr \fBpair\fP (const _T1 &__a, const _T2 &__b)" .br .ti -1c .RI "template() &&!_PCCP::template _ImplicitlyConvertiblePair< _U1, _U2 >(), bool >::type = false> constexpr \fBpair\fP (const _T1 &__a, const _T2 &__b)" .br .ti -1c .RI "template(), bool >::type = true> constexpr \fBpair\fP (const _T1 &__x, _U2 &&__y)" .br .ti -1c .RI "template(), bool >::type = false> \fBpair\fP (const _T1 &__x, _U2 &&__y)" .br .ti -1c .RI "constexpr \fBpair\fP (const \fBpair\fP &)=default" .br .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 .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 \fBpair\fP (\fBpiecewise_construct_t\fP, \fBtuple\fP< _Args1\&.\&.\&. >, \fBtuple\fP< _Args2\&.\&.\&. >)" .br .ti -1c .RI "template \fBenable_if\fP< __and_< \fBis_assignable\fP< _T1 &, const _U1 & >, \fBis_assignable\fP< _T2 &, const _U2 & > >::value, \fBpair\fP & >::type \fBoperator=\fP (const \fBpair\fP< _U1, _U2 > &__p)" .br .ti -1c .RI "template \fBenable_if\fP< __and_< \fBis_assignable\fP< _T1 &, _U1 && >, \fBis_assignable\fP< _T2 &, _U2 && > >::value, \fBpair\fP & >::type \fBoperator=\fP (\fBpair\fP< _U1, _U2 > &&__p)" .br .ti -1c .RI "\fBpair\fP & \fBoperator=\fP (typename \fBconditional\fP< __and_< \fBis_copy_assignable\fP< _T1 >, \fBis_copy_assignable\fP< _T2 >>::value, const \fBpair\fP &, const __nonesuch_no_braces & >::type __p)" .br .ti -1c .RI "\fBpair\fP & \fBoperator=\fP (typename \fBconditional\fP< __and_< \fBis_move_assignable\fP< _T1 >, \fBis_move_assignable\fP< _T2 >>::value, \fBpair\fP &&, __nonesuch_no_braces && >::type __p) noexcept(__and_< \fBis_nothrow_move_assignable\fP< _T1 >, \fBis_nothrow_move_assignable\fP< _T2 >>::value)" .br .ti -1c .RI "void \fBswap\fP (\fBpair\fP &__p) noexcept(__and_< __is_nothrow_swappable< _T1 >, __is_nothrow_swappable< _T2 >>::value)" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "_T1 \fBfirst\fP" .br .RI "\fCsecond_type\fP is the second bound type " .ti -1c .RI "_T2 \fBsecond\fP" .br .RI "\fCfirst\fP is a copy of the first object " .in -1c .SH "Detailed Description" .PP .SS "template .br struct std::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 .PP Definition at line 208 of file stl_pair\&.h\&. .SH "Member Typedef Documentation" .PP .SS "template template using \fBstd::pair\fP< _T1, _T2 >::\fB_PCCFP\fP = _PCC::value || !\fBis_same\fP<_T2, _U2>::value, _T1, _T2>" There is also a templated copy ctor for the \fCpair\fP class itself\&. .PP Definition at line 281 of file stl_pair\&.h\&. .SS "template using \fBstd::pair\fP< _T1, _T2 >::\fB_PCCP\fP = _PCC" Two objects may be passed to a \fCpair\fP constructor to be copied\&. .PP Definition at line 252 of file stl_pair\&.h\&. .SS "template typedef _T2 \fBstd::pair\fP< _T1, _T2 >::\fBsecond_type\fP" .PP \fCfirst_type\fP is the first bound type .PP Definition at line 212 of file stl_pair\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "template template, __is_implicitly_default_constructible< _U2 >> ::value, bool >::type = true> constexpr \fBstd::pair\fP< _T1, _T2 >::\fBpair\fP ()\fC [inline]\fP, \fC [constexpr]\fP" .PP \fCsecond\fP is a copy of the second object The default constructor creates \fCfirst\fP and \fCsecond\fP using their respective default constructors\&. .PP Definition at line 229 of file stl_pair\&.h\&. .SH "Member Data Documentation" .PP .SS "template _T1 \fBstd::pair\fP< _T1, _T2 >::first" .PP \fCsecond_type\fP is the second bound type .PP Definition at line 214 of file stl_pair\&.h\&. .PP Referenced by __gnu_parallel::__find_template(), std::__sample(), __gnu_debug::__valid_range_aux(), std::set< _Key, _Compare, _Alloc >::insert(), std::operator<(), std::operator==(), and std::regex_replace()\&. .SS "template _T2 \fBstd::pair\fP< _T1, _T2 >::second" .PP \fCfirst\fP is a copy of the first object .PP Definition at line 215 of file stl_pair\&.h\&. .PP Referenced by std::__sample(), __gnu_debug::__valid_range_aux(), std::set< _Key, _Compare, _Alloc >::insert(), std::regex_traits< _Ch_type >::lookup_classname(), std::operator<(), std::operator==(), and std::regex_replace()\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.