8#ifndef INCLUDED_BSLSTL_PAIR
9#define INCLUDED_BSLSTL_PAIR
311#include <bslscm_version.h>
321#ifndef BDE_OMIT_INTERNAL_DEPRECATED
352#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE)
356#ifdef BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS
362#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
366#if !defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
367 && !defined(BSLS_PLATFORM_CMP_CLANG)
378# error This header should not be #included with 'std' being a macro
381#if !defined(BSLS_PLATFORM_CMP_SUN) \
382 || !defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
385void swap(TYPE& a, TYPE& b);
392#if !defined(BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS) \
393 || (defined(BSLS_PLATFORM_CMP_MSVC) && BSLS_PLATFORM_CMP_VERSION < 1900)
394# define BSLSTL_PAIR_NO_IMPLICIT_DELETED_FOR_MOVE_OPS 1
405#if !defined(BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS) || \
406 !defined(BSLS_COMPILERFEATURES_SUPPORT_DEFAULT_TEMPLATE_ARGS) || \
407 (defined(BSLS_PLATFORM_CMP_MSVC) && BSLS_PLATFORM_CMP_VERSION < 1900)
410#define BSLSTL_PAIR_DO_NOT_DEFAULT_THE_DEFAULT_CONSTRUCTOR 1
413#if defined(BSLS_PLATFORM_CMP_MSVC)
414#if (BSLS_COMPILERFEATURES_CPLUSPLUS < 201703L || \
415 BSLS_PLATFORM_CMP_VERSION <= 1916)
421#define BSLSTL_PAIR_DO_NOT_SFINAE_TEST_IS_SWAPPABLE 1
425#if !defined(BSLS_COMPILERFEATURES_SUPPORT_DECLTYPE)
429#define BSLSTL_PAIR_DO_NOT_SFINAE_TEST_IS_SWAPPABLE 1
435#ifdef BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE
439template <std::size_t... INTS>
440using Pair_IndexSequence = bslmf::IntegerSequence<std::size_t, INTS...>;
446template <std::
size_t N>
447using Pair_MakeIndexSequence = bslmf::MakeIntegerSequence<std::size_t, N>;
481 BloombergLP::bslma::UsesBslmaAllocator<TYPE>::value
482 ? (BloombergLP::bslmf::UsesAllocatorArgT<TYPE>::value
483 ? Pair_BslmaIdiomAllocatorArgT::value
484 : Pair_BslmaIdiomAtEnd::value)
485 : Pair_BslmaIdiomNone::value>
489#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE)
496template <
class TYPE,
class ... ARGS>
498 sizeof...(ARGS) + Pair_BslmaIdiom<TYPE>::value >
512#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE)
519 template <
class ... ARGS>
524 BloombergLP::bslma::Allocator *alloc,
534 template <
class ... ARGS>
536 std::tuple<ARGS..., BloombergLP::bslma::Allocator *>
539 BloombergLP::bslma::Allocator *alloc,
549 template <
class ... ARGS>
551 std::tuple<bsl::allocator_arg_t,
552 BloombergLP::bslma::Allocator *,
556 BloombergLP::bslma::Allocator *alloc,
560#if defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) && \
561 defined(BSLSTL_PAIR_DO_NOT_SFINAE_TEST_IS_SWAPPABLE)
562 template <
class TYPE1,
class TYPE2>
563 static constexpr bool hasNothrowSwap()
571 typedef BloombergLP::bslmf::Util U;
573 U::declval<TYPE1&>())) &&
575 U::declval<TYPE2&>()));
594 typedef BloombergLP::bslmf::MovableRefUtil MovUtil;
600 struct SfinaeEnable {};
608#if !defined(BSLSTL_PAIR_DO_NOT_DEFAULT_THE_DEFAULT_CONSTRUCTOR)
610 class BSLSTL_DUMMY = TYPE,
612 std::enable_if<std::is_default_constructible<BSLSTL_DUMMY>::value,
649#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
650 template <
class PARAM>
653 typename std::enable_if<
656 typename std::remove_cv<
657 typename std::remove_reference<PARAM>::type>::type>::value,
658 SfinaeEnable>::type = SfinaeEnable());
660 template <
class PARAM>
663 template <
class PARAM>
672#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
673 template <
class PARAM>
675 BloombergLP::bslma::Allocator *basicAllocator,
677 template <
class PARAM>
679 BloombergLP::bslma::Allocator *basicAllocator,
681 template <
class PARAM>
683 BloombergLP::bslma::Allocator *basicAllocator,
686 template <
class PARAM>
688 BloombergLP::bslma::Allocator *basicAllocator,
690 template <
class PARAM>
692 BloombergLP::bslma::Allocator *basicAllocator,
694 template <
class PARAM>
696 BloombergLP::bslma::Allocator *basicAllocator,
698 template <
class PARAM>
700 BloombergLP::bslma::Allocator *basicAllocator,
702 template <
class PARAM>
704 BloombergLP::bslma::Allocator *basicAllocator,
706 template <
class PARAM>
708 BloombergLP::bslma::Allocator *basicAllocator,
722#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE) \
723 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
730 template <
class ...ARGS,
size_t ...I>
732 BloombergLP::bslstl::Pair_IndexSequence<I...>);
756#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
757 template <
class PARAM>
761 template <
class PARAM>
764 template <
class PARAM>
771#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
772 template <
class PARAM>
775 BloombergLP::bslma::Allocator *basicAllocator,
778 template <
class PARAM>
781 BloombergLP::bslma::Allocator *basicAllocator,
783 template <
class PARAM>
786 BloombergLP::bslma::Allocator *basicAllocator,
792#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE) \
793 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
803 BloombergLP::bslstl::Pair_IndexSequence<0u>);
809#if !defined(BSLSTL_PAIR_NO_IMPLICIT_DELETED_FOR_MOVE_OPS)
816#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
839 template <
class PARAM>
853 template <
class PARAM>
856 BloombergLP::bslma::Allocator *basicAllocator,
859#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE) \
860 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
870 BloombergLP::bslstl::Pair_IndexSequence<0u>);
876#if !defined(BSLSTL_PAIR_NO_IMPLICIT_DELETED_FOR_MOVE_OPS)
898 typedef BloombergLP::bslmf::MovableRefUtil MovUtil;
904 struct SfinaeEnable {};
911#if !defined(BSLSTL_PAIR_DO_NOT_DEFAULT_THE_DEFAULT_CONSTRUCTOR)
913 class BSLSTL_DUMMY = TYPE,
915 std::enable_if<std::is_default_constructible<BSLSTL_DUMMY>::value,
952#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
953 template <
class PARAM>
956 typename std::enable_if<
959 typename std::remove_cv<
960 typename std::remove_reference<PARAM>::type>::type>::value,
961 SfinaeEnable>::type = SfinaeEnable());
963 template <
class PARAM>
966 template <
class PARAM>
974#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
975 template <
class PARAM>
977 BloombergLP::bslma::Allocator *basicAllocator,
979 template <
class PARAM>
981 BloombergLP::bslma::Allocator *basicAllocator,
983 template <
class PARAM>
985 BloombergLP::bslma::Allocator *basicAllocator,
988 template <
class PARAM>
990 BloombergLP::bslma::Allocator *basicAllocator,
992 template <
class PARAM>
994 BloombergLP::bslma::Allocator *basicAllocator,
996 template <
class PARAM>
998 BloombergLP::bslma::Allocator *basicAllocator,
1000 template <
class PARAM>
1002 BloombergLP::bslma::Allocator *basicAllocator,
1004 template <
class PARAM>
1006 BloombergLP::bslma::Allocator *basicAllocator,
1008 template <
class PARAM>
1010 BloombergLP::bslma::Allocator *basicAllocator,
1024#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE) \
1025 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
1032 template <
class ...ARGS,
size_t ...I>
1034 BloombergLP::bslstl::Pair_IndexSequence<I...>);
1045template <
class TYPE>
1059#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
1060 template <
class PARAM>
1064 template <
class PARAM>
1067 template <
class PARAM>
1075#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
1076 template <
class PARAM>
1079 BloombergLP::bslma::Allocator *basicAllocator,
1082 template <
class PARAM>
1085 BloombergLP::bslma::Allocator *basicAllocator,
1087 template <
class PARAM>
1090 BloombergLP::bslma::Allocator *basicAllocator,
1104#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE) \
1105 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
1112 template <
class ARG>
1115 BloombergLP::bslstl::Pair_IndexSequence<0u>);
1121#if !defined(BSLSTL_PAIR_NO_IMPLICIT_DELETED_FOR_MOVE_OPS)
1128#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
1131template <
class TYPE>
1148 template <
class PARAM>
1162 template <
class PARAM>
1165 BloombergLP::bslma::Allocator *basicAllocator,
1168#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE) \
1169 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
1176 template <
class ARG>
1179 BloombergLP::bslstl::Pair_IndexSequence<0u>);
1185#if !defined(BSLSTL_PAIR_NO_IMPLICIT_DELETED_FOR_MOVE_OPS)
1209template <
class T1,
class T2>
1223 typedef BloombergLP::bslmf::MovableRefUtil MovUtil;
1227 struct SfinaeEnable {};
1239#if !defined(BSLSTL_PAIR_DO_NOT_DEFAULT_THE_DEFAULT_CONSTRUCTOR)
1252 explicit pair(BloombergLP::bslma::Allocator *basicAllocator);
1261 pair(
const pair& original, BloombergLP::bslma::Allocator *basicAllocator);
1263#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
1265 pair(
pair&& original, BloombergLP::bslma::Allocator *basicAllocator);
1268 pair(BloombergLP::bslmf::MovableRef<pair> original);
1279 pair(BloombergLP::bslmf::MovableRef<pair> original,
1280 BloombergLP::bslma::Allocator *basicAllocator);
1295 BloombergLP::bslma::Allocator *basicAllocator);
1297#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
1298 template <
class PARAM_1,
class PARAM_2>
1303 std::is_constructible<T1, PARAM_1>::value &&
1304 std::is_constructible<T2, PARAM_2>::value &&
1306 typename bsl::remove_reference<PARAM_2>::type>::value &&
1308 BloombergLP::bslma::Allocator *>::value),
1309 SfinaeEnable>::type = SfinaeEnable())
1317 template <
class PARAM_1,
class PARAM_2>
1320 BloombergLP::bslma::Allocator *basicAllocator);
1322 template <
class PARAM_1,
class PARAM_2>
1330 typename bsl::remove_reference<PARAM_2>::type>::value &&
1332 BloombergLP::bslma::Allocator *>::value),
1333 SfinaeEnable>::type = SfinaeEnable())
1341 template <
class PARAM_1,
class PARAM_2>
1344 BloombergLP::bslma::Allocator *basicAllocator);
1346 template <
class PARAM_1,
class PARAM_2>
1354 typename bsl::remove_reference<PARAM_2>::type>::value &&
1356 BloombergLP::bslma::Allocator *>::value),
1357 SfinaeEnable>::type = SfinaeEnable())
1365 template <
class PARAM_1,
class PARAM_2>
1368 BloombergLP::bslma::Allocator *basicAllocator);
1370 template <
class PARAM_1,
class PARAM_2>
1378 typename bsl::remove_reference<PARAM_2>::type>::value &&
1380 BloombergLP::bslma::Allocator *>::value),
1381 SfinaeEnable>::type = SfinaeEnable())
1389 template <
class PARAM_1,
class PARAM_2>
1392 BloombergLP::bslma::Allocator *basicAllocator);
1394 template <
class PARAM_1,
class PARAM_2>
1402 typename bsl::remove_reference<PARAM_2>::type>::value &&
1404 BloombergLP::bslma::Allocator *>::value),
1405 SfinaeEnable>::type = SfinaeEnable())
1413 template <
class PARAM_1,
class PARAM_2>
1416 BloombergLP::bslma::Allocator *basicAllocator);
1427#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY)
1428 template <
class PARAM_1,
class PARAM_2>
1432 std::is_constructible<T1, const PARAM_1&>::value &&
1433 std::is_constructible<T2, const PARAM_2&>::value,
1434 SfinaeEnable>::type = SfinaeEnable());
1435 template <
class PARAM_1,
class PARAM_2>
1437 pair(
const std::pair<PARAM_1, PARAM_2>& other,
1439 std::is_constructible<T1, const PARAM_1&>::value &&
1440 std::is_constructible<T2, const PARAM_2&>::value,
1441 SfinaeEnable>::type = SfinaeEnable());
1443 template <
class PARAM_1,
class PARAM_2>
1446 template <
class PARAM_1,
class PARAM_2>
1448 pair(
const std::pair<PARAM_1, PARAM_2>& other);
1457 template <
class PARAM_1,
class PARAM_2>
1459 BloombergLP::bslma::Allocator *basicAllocator);
1460 template <
class PARAM_1,
class PARAM_2>
1461 pair(
const std::pair<PARAM_1, PARAM_2>& other,
1462 BloombergLP::bslma::Allocator *basicAllocator);
1464#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
1472 template <
class PARAM_1,
class PARAM_2>
1477 SfinaeEnable>::type = SfinaeEnable());
1478 template <
class PARAM_1,
class PARAM_2>
1480 pair(std::pair<PARAM_1, PARAM_2>&& other,
1483 SfinaeEnable>::type = SfinaeEnable());
1484 template <
class PARAM_1,
class PARAM_2>
1486 BloombergLP::bslma::Allocator *basicAllocator);
1487 template <
class PARAM_1,
class PARAM_2>
1488 pair(std::pair<PARAM_1, PARAM_2>&& other,
1489 BloombergLP::bslma::Allocator *basicAllocator);
1491 template <
class PARAM_1,
class PARAM_2>
1496 SfinaeEnable>::type = SfinaeEnable())
1506 template <
class PARAM_1,
class PARAM_2>
1508 pair(BloombergLP::bslmf::MovableRef<std::pair<PARAM_1, PARAM_2> > other,
1511 SfinaeEnable>::type = SfinaeEnable())
1528 template <
class PARAM_1,
class PARAM_2>
1531 BloombergLP::bslma::Allocator *basicAllocator);
1532 template <
class PARAM_1,
class PARAM_2>
1533 pair(BloombergLP::bslmf::MovableRef<std::pair<PARAM_1, PARAM_2> > other,
1534 BloombergLP::bslma::Allocator *basicAllocator);
1537#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR)
1551 template<
class ...ARGS_1,
class ...ARGS_2>
1552 pair(std::piecewise_construct_t,
1553 std::tuple<ARGS_1...> first_args,
1554 std::tuple<ARGS_2...> second_args);
1555 template<
class ...ARGS_1,
class ...ARGS_2>
1556 pair(std::piecewise_construct_t,
1557 std::tuple<ARGS_1...> first_args,
1558 std::tuple<ARGS_2...> second_args,
1559 BloombergLP::bslma::Allocator *basicAllocator);
1562#ifndef BDE_OMIT_INTERNAL_DEPRECATED
1566 template <
class PARAM_1,
class PARAM_2>
1568 pair(
const BloombergLP::bslma::ManagedPtr_PairProxy<PARAM_1, PARAM_2>&
1584 template <
class PARAM_1,
class PARAM_2>
1587#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
1593 template <
class PARAM_1,
class PARAM_2>
1609 template <
class PARAM_1,
class PARAM_2>
1622 template <
class PARAM_1,
class PARAM_2>
1625#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE)
1628 template <
class PARAM_1,
class PARAM_2,
1634 template <class PARAM_1,
1637 operator
std::tuple<PARAM_1&, decltype(
std::ignore)&>()
1644 template <class PARAM_2,
1647 operator
std::tuple<decltype(
std::ignore)&, PARAM_2&>()
1654 operator
std::tuple<decltype(
std::ignore)&,
1663 return std::tuple<
decltype(std::ignore)&,
1664 decltype(std::ignore)&>(std::ignore,
1669#if defined(BSLSTL_PAIR_DO_NOT_SFINAE_TEST_IS_SWAPPABLE)
1671 Pair_ImpUtil::hasNothrowSwap<T1, T2>());
1673 void swap(
pair& other)
1675 && bsl::is_nothrow_swappable<T2>::value);
1683#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1695template <
class T1,
class T2>
1696pair(T1, T2) -> pair<T1, T2>;
1706 class =
typename bsl::enable_if_t<
1707 bsl::is_convertible_v<ALLOC *, BloombergLP::bslma::Allocator *>>
1709pair(T1, T2, ALLOC *) -> pair<T1, T2>;
1719 class =
typename bsl::enable_if_t<
1720 bsl::is_convertible_v<ALLOC *, BloombergLP::bslma::Allocator *>>
1722pair(pair<T1, T2>, ALLOC *) -> pair<T1, T2>;
1726template <
class T1,
class T2>
1727pair(std::pair<T1, T2>) -> pair<T1, T2>;
1737 class =
typename bsl::enable_if_t<
1738 bsl::is_convertible_v<ALLOC *, BloombergLP::bslma::Allocator *>>
1740pair(std::pair<T1, T2>, ALLOC *) -> pair<T1, T2>;
1749template <
class T1,
class T2>
1752bool operator==(
const pair<T1, T2>& lhs,
const pair<T1, T2>& rhs);
1754#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
1759template <
class T1,
class T2>
1762bool operator!=(
const pair<T1, T2>& lhs,
const pair<T1, T2>& rhs);
1765#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
1770template <
class T1,
class T2>
1772std::common_comparison_category_t<
1773 BloombergLP::bslalg::SynthThreeWayUtil::Result<T1>,
1774 BloombergLP::bslalg::SynthThreeWayUtil::Result<T2>
1775> operator<=>(
const pair<T1, T2>& lhs,
const pair<T1, T2>& rhs);
1786template <
class T1,
class T2>
1789bool operator<(
const pair<T1, T2>& lhs,
const pair<T1, T2>& rhs);
1795template <
class T1,
class T2>
1798bool operator>(
const pair<T1, T2>& lhs,
const pair<T1, T2>& rhs);
1804template <
class T1,
class T2>
1807bool operator<=(
const pair<T1, T2>& lhs,
const pair<T1, T2>& rhs);
1813template <
class T1,
class T2>
1816bool operator>=(
const pair<T1, T2>& lhs,
const pair<T1, T2>& rhs);
1825template <
class T1,
class T2>
1826#if defined(BSLSTL_PAIR_DO_NOT_SFINAE_TEST_IS_SWAPPABLE)
1830 && bsl::is_swappable<T2>::value>::type
1832swap(pair<T1, T2>& a, pair<T1, T2>& b)
1838template <
class HASHALG,
class T1,
class T2>
1839void hashAppend(HASHALG& hashAlg,
const pair<T1, T2>& input);
1843#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE)
1847#if defined(BSLS_PLATFORM_CMP_CLANG)
1848#pragma clang diagnostic push
1849#pragma clang diagnostic ignored "-Wmismatched-tags"
1858template<
class T1,
class T2>
1859struct tuple_element<0,
bsl::pair<T1, T2> >
1867template<
class T1,
class T2>
1868struct tuple_element<1,
bsl::pair<T1, T2> >
1880template<
class T1,
class T2>
1881struct tuple_size<
bsl::pair<T1, T2> > : integral_constant<size_t, 2>
1884#if defined(BSLS_PLATFORM_CMP_CLANG)
1885#pragma clang diagnostic pop
1899template <std::
size_t INDEX,
class T1,
class T2>
1900struct Pair_GetImpUtil
1907template <
class T1,
class T2>
1908struct Pair_GetImpUtil<0, T1, T2>
1929#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
1945template <
class T1,
class T2>
1946struct Pair_GetImpUtil<1u, T1, T2>
1967#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
1984template <
class T,
class T1,
class T2>
1985struct Pair_IndexOfType
1990template <
class T1,
class T2>
1996template <
class T1,
class T2>
2011template<std::
size_t INDEX,
class T1,
class T2>
2012typename std::tuple_element<INDEX, bsl::pair<T1, T2> >::type&
2019template<std::
size_t INDEX,
class T1,
class T2>
2020const typename std::tuple_element<INDEX, bsl::pair<T1, T2> >::type&
2023#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2028template<std::
size_t INDEX,
class T1,
class T2>
2029typename std::tuple_element<INDEX, bsl::pair<T1, T2> >::type&&
2037template<
class TYPE,
class T1,
class T2>
2044template<
class TYPE,
class T1,
class T2>
2047#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2052template<
class TYPE,
class T1,
class T2>
2059template<
class TYPE,
class T1,
class T2>
2077#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE)
2078template <
class ... ARGS>
2081Pair_ImpUtil::concatAllocator(
2083 BloombergLP::bslma::Allocator *,
2086 return BloombergLP::bslmf::MovableRefUtil::move(tpl);
2089template <
class ... ARGS>
2091std::tuple<ARGS..., BloombergLP::bslma::Allocator *>
2092Pair_ImpUtil::concatAllocator(
2094 BloombergLP::bslma::Allocator *alloc,
2097 return std::tuple_cat(BloombergLP::bslmf::MovableRefUtil::move(tpl),
2101template <
class ... ARGS>
2103std::tuple<bsl::allocator_arg_t,
2104 BloombergLP::bslma::Allocator *,
2106Pair_ImpUtil::concatAllocator(
2108 BloombergLP::bslma::Allocator *alloc,
2111 return std::tuple_cat(std::tie(bsl::allocator_arg, alloc),
2112 BloombergLP::bslmf::MovableRefUtil::move(tpl));
2121#if defined(BSLSTL_PAIR_DO_NOT_DEFAULT_THE_DEFAULT_CONSTRUCTOR)
2122template <
class TYPE>
2131template <
class TYPE>
2139template <
class TYPE>
2143: first(basicAllocator)
2147template <
class TYPE>
2151: first(
bsl::allocator_arg, basicAllocator)
2155template <
class TYPE>
2164#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2165template <
class TYPE>
2166template <
class PARAM>
2171 typename std::enable_if<
2173 typename std::remove_cv<
typename std::remove_reference<
2174 PARAM>::type>::type>::value,
2175 SfinaeEnable>::type)
2180template <
class TYPE>
2181template <
class PARAM>
2189template <
class TYPE>
2190template <
class PARAM>
2199#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2200template <
class TYPE>
2201template <
class PARAM>
2204 BloombergLP::bslma::Allocator *,
2210template <
class TYPE>
2211template <
class PARAM>
2214 BloombergLP::bslma::Allocator *basicAllocator,
2220template <
class TYPE>
2221template <
class PARAM>
2224 BloombergLP::bslma::Allocator *basicAllocator,
2226: first(
bsl::allocator_arg,
2232template <
class TYPE>
2233template <
class PARAM>
2236 BloombergLP::bslma::Allocator *,
2242template <
class TYPE>
2243template <
class PARAM>
2246 BloombergLP::bslma::Allocator *,
2252template <
class TYPE>
2253template <
class PARAM>
2256 BloombergLP::bslma::Allocator *basicAllocator,
2258: first(value, basicAllocator)
2262template <
class TYPE>
2263template <
class PARAM>
2266 BloombergLP::bslma::Allocator *basicAllocator,
2268: first(value, basicAllocator)
2272template <
class TYPE>
2273template <
class PARAM>
2276 BloombergLP::bslma::Allocator *basicAllocator,
2278: first(
bsl::allocator_arg, basicAllocator, value)
2282template <
class TYPE>
2283template <
class PARAM>
2286 BloombergLP::bslma::Allocator *basicAllocator,
2288: first(
bsl::allocator_arg, basicAllocator, value)
2293#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE) \
2294 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
2295template <
class TYPE>
2296template <
class ...ARGS,
size_t ...I>
2300 BloombergLP::bslstl::Pair_IndexSequence<I...>)
2301: first(
std::
get<I>(
std::move(argsPack))...)
2312template <
class TYPE>
2320#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2321template <
class TYPE>
2322template <
class PARAM>
2326: first(
std::forward<PARAM>(value))
2330template <
class TYPE>
2331template <
class PARAM>
2339template <
class TYPE>
2340template <
class PARAM>
2349#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2350template <
class TYPE>
2351template <
class PARAM>
2355 BloombergLP::bslma::Allocator *,
2357: first(
std::forward<PARAM>(value))
2361template <
class TYPE>
2362template <
class PARAM>
2366 BloombergLP::bslma::Allocator *,
2372template <
class TYPE>
2373template <
class PARAM>
2377 BloombergLP::bslma::Allocator *,
2384#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE) \
2385 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
2386template <
class TYPE>
2391 BloombergLP::bslstl::Pair_IndexSequence<0u>)
2392: first(
std::
get<0u>(arg))
2399template <
class TYPE>
2408#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2415template <
class TYPE>
2419: first(
std::move(value))
2423template <
class TYPE>
2424template <
class PARAM>
2428: first(
std::forward<PARAM>(value))
2432template <
class TYPE>
2433template <
class PARAM>
2437 BloombergLP::bslma::Allocator *,
2439: first(
std::forward<PARAM>(value))
2443#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE) \
2444 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
2445template <
class TYPE>
2450 BloombergLP::bslstl::Pair_IndexSequence<0u>)
2451: first(
std::
get<0u>(arg))
2457template <
class TYPE>
2472#if defined(BSLSTL_PAIR_DO_NOT_DEFAULT_THE_DEFAULT_CONSTRUCTOR)
2473template <
class TYPE>
2482template <
class TYPE>
2490template <
class TYPE>
2494: second(basicAllocator)
2498template <
class TYPE>
2502: second(
bsl::allocator_arg, basicAllocator)
2506template <
class TYPE>
2515#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2516template <
class TYPE>
2517template <
class PARAM>
2522 typename std::enable_if<
2524 typename std::remove_cv<
typename std::remove_reference<
2525 PARAM>::type>::type>::value,
2526 SfinaeEnable>::type)
2531template <
class TYPE>
2532template <
class PARAM>
2539template <
class TYPE>
2540template <
class PARAM>
2549#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2550template <
class TYPE>
2551template <
class PARAM>
2554 BloombergLP::bslma::Allocator *,
2560template <
class TYPE>
2561template <
class PARAM>
2564 BloombergLP::bslma::Allocator *basicAllocator,
2570template <
class TYPE>
2571template <
class PARAM>
2574 BloombergLP::bslma::Allocator *basicAllocator,
2576: second(
bsl::allocator_arg,
2582template <
class TYPE>
2583template <
class PARAM>
2586 BloombergLP::bslma::Allocator *,
2592template <
class TYPE>
2593template <
class PARAM>
2596 BloombergLP::bslma::Allocator *,
2602template <
class TYPE>
2603template <
class PARAM>
2606 BloombergLP::bslma::Allocator *basicAllocator,
2608: second(value, basicAllocator)
2612template <
class TYPE>
2613template <
class PARAM>
2616 BloombergLP::bslma::Allocator *basicAllocator,
2618: second(value, basicAllocator)
2622template <
class TYPE>
2623template <
class PARAM>
2626 BloombergLP::bslma::Allocator *basicAllocator,
2628: second(
bsl::allocator_arg, basicAllocator, value)
2632template <
class TYPE>
2633template <
class PARAM>
2636 BloombergLP::bslma::Allocator *basicAllocator,
2638: second(
bsl::allocator_arg, basicAllocator, value)
2643#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE) \
2644 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
2645template <
class TYPE>
2646template <
class ...ARGS,
size_t ...I>
2649 BloombergLP::bslstl::Pair_IndexSequence<I...>)
2650: second(
std::
get<I>(
std::move(argsPack))...)
2660template <
class TYPE>
2668#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2669template <
class TYPE>
2670template <
class PARAM>
2674: second(
std::forward<PARAM>(value))
2678template <
class TYPE>
2679template <
class PARAM>
2687template <
class TYPE>
2688template <
class PARAM>
2697#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2698template <
class TYPE>
2699template <
class PARAM>
2703 BloombergLP::bslma::Allocator *,
2705: second(
std::forward<PARAM>(value))
2709template <
class TYPE>
2710template <
class PARAM>
2714 BloombergLP::bslma::Allocator *,
2720template <
class TYPE>
2721template <
class PARAM>
2725 BloombergLP::bslma::Allocator *,
2732#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE) \
2733 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
2734template <
class TYPE>
2739 BloombergLP::bslstl::Pair_IndexSequence<0u>)
2740: second(
std::
get<0u>(arg))
2746template <
class TYPE>
2756#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2762template <
class TYPE>
2765: second(
std::move(value))
2769template <
class TYPE>
2770template <
class PARAM>
2774: second(
std::forward<PARAM>(value))
2778template <
class TYPE>
2779template <
class PARAM>
2783 BloombergLP::bslma::Allocator *,
2785: second(
std::forward<PARAM>(value))
2789#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE) \
2790 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
2791template <
class TYPE>
2796 BloombergLP::bslstl::Pair_IndexSequence<0u>)
2797: second(
std::
get<0u>(arg))
2803template <
class TYPE>
2817#if defined(BSLSTL_PAIR_DO_NOT_DEFAULT_THE_DEFAULT_CONSTRUCTOR)
2818template <
class T1,
class T2>
2828template <
class T1,
class T2>
2836template <
class T1,
class T2>
2846template <
class T1,
class T2>
2851 BloombergLP::bslma::Allocator *basicAllocator)
2857#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2858template <
class T1,
class T2>
2859template <
class PARAM_1,
class PARAM_2>
2863 BloombergLP::bslma::Allocator *basicAllocator)
2873template <
class T1,
class T2>
2874template <
class PARAM_1,
class PARAM_2>
2878 BloombergLP::bslma::Allocator *basicAllocator)
2884template <
class T1,
class T2>
2885template <
class PARAM_1,
class PARAM_2>
2889 BloombergLP::bslma::Allocator *basicAllocator)
2895template <
class T1,
class T2>
2896template <
class PARAM_1,
class PARAM_2>
2900 BloombergLP::bslma::Allocator *basicAllocator)
2906template <
class T1,
class T2>
2907template <
class PARAM_1,
class PARAM_2>
2911 BloombergLP::bslma::Allocator *basicAllocator)
2918#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR) \
2919 && defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
2920template <
class T1,
class T2>
2921template<
class ...ARGS_1,
class ...ARGS_2>
2924 std::tuple<ARGS_1...> first_args,
2925 std::tuple<ARGS_2...> second_args)
2926: FirstBase(
std::move(first_args),
2927 typename BloombergLP::
bslstl::Pair_MakeIndexSequence<
2928 std::tuple_size<
std::tuple<ARGS_1...> >::value
2930, SecondBase(
std::move(second_args),
2931 typename BloombergLP::
bslstl::Pair_MakeIndexSequence<
2932 std::tuple_size<
std::tuple<ARGS_2...> >::value
2937template <
class T1,
class T2>
2938template<
class ...ARGS_1,
class ...ARGS_2>
2941 std::tuple<ARGS_1...> first_args,
2942 std::tuple<ARGS_2...> second_args,
2943 BloombergLP::bslma::Allocator *basicAllocator)
2944: FirstBase(Pair_ImpUtil::concatAllocator(
std::move(first_args),
2947 typename BloombergLP::
bslstl::Pair_MakeIndexSequence<
2948 Pair_ConstructionParametersPackLength<T1, ARGS_1...>::value>())
2949, SecondBase(Pair_ImpUtil::concatAllocator(
std::move(second_args),
2951 SecondBslmaIdiom()),
2952 typename BloombergLP::
bslstl::Pair_MakeIndexSequence<
2953 Pair_ConstructionParametersPackLength<T2, ARGS_2...>::value>())
2958template <
class T1,
class T2>
2961 BloombergLP::bslma::Allocator *basicAllocator)
2967#if defined (BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
2968template <
class T1,
class T2>
2971 BloombergLP::bslma::Allocator *basicAllocator)
2981template <
class T1,
class T2>
2985:
FirstBase(MovUtil::move(MovUtil::access(original).first))
2986,
SecondBase(MovUtil::move(MovUtil::access(original).second))
2990template <
class T1,
class T2>
2994 BloombergLP::bslma::Allocator *basicAllocator)
2995:
FirstBase(MovUtil::move(MovUtil::access(original).first),
2998,
SecondBase(MovUtil::move(MovUtil::access(original).second),
3005#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY)
3006template <
class T1,
class T2>
3007template <
class PARAM_1,
class PARAM_2>
3013 std::is_constructible<T1, const PARAM_1&>::value &&
3014 std::is_constructible<T2, const PARAM_2&>::value,
3015 SfinaeEnable>::type)
3021template <
class T1,
class T2>
3022template <
class PARAM_1,
class PARAM_2>
3026 const std::pair<PARAM_1, PARAM_2>& other,
3028 std::is_constructible<T1, const PARAM_1&>::value &&
3029 std::is_constructible<T2, const PARAM_2&>::value,
3030 SfinaeEnable>::type)
3036template <
class T1,
class T2>
3037template <
class PARAM_1,
class PARAM_2>
3041: FirstBase(other.first)
3042, SecondBase(other.second)
3046template <
class T1,
class T2>
3047template <
class PARAM_1,
class PARAM_2>
3051: FirstBase(other.first)
3052, SecondBase(other.second)
3057template <
class T1,
class T2>
3058template <
class PARAM_1,
class PARAM_2>
3061 BloombergLP::bslma::Allocator *basicAllocator)
3067template <
class T1,
class T2>
3068template <
class PARAM_1,
class PARAM_2>
3071 BloombergLP::bslma::Allocator *basicAllocator)
3077#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
3078template <
class T1,
class T2>
3079template <
class PARAM_1,
class PARAM_2>
3084 SfinaeEnable>::type)
3085: FirstBase(MovUtil::move(other.first))
3086, SecondBase(MovUtil::move(other.second))
3090template <
class T1,
class T2>
3091template <
class PARAM_1,
class PARAM_2>
3093 std::pair<PARAM_1, PARAM_2>&& other,
3096 SfinaeEnable>::type)
3097: FirstBase(MovUtil::move(other.first))
3098, SecondBase(MovUtil::move(other.second))
3102template <
class T1,
class T2>
3103template <
class PARAM_1,
class PARAM_2>
3105 BloombergLP::bslma::Allocator *basicAllocator)
3106: FirstBase(MovUtil::move(other.first), basicAllocator, FirstBslmaIdiom())
3107, SecondBase(MovUtil::move(other.second), basicAllocator, SecondBslmaIdiom())
3111template <
class T1,
class T2>
3112template <
class PARAM_1,
class PARAM_2>
3114 BloombergLP::bslma::Allocator *basicAllocator)
3115: FirstBase(MovUtil::move(other.first), basicAllocator, FirstBslmaIdiom())
3116, SecondBase(MovUtil::move(other.second), basicAllocator, SecondBslmaIdiom())
3120template <
class T1,
class T2>
3121template <
class PARAM_1,
class PARAM_2>
3124 BloombergLP::bslma::Allocator *basicAllocator)
3125:
FirstBase(MovUtil::move(MovUtil::access(other).first),
3128,
SecondBase(MovUtil::move(MovUtil::access(other).second),
3134template <
class T1,
class T2>
3135template <
class PARAM_1,
class PARAM_2>
3137 BloombergLP::bslmf::MovableRef<std::pair<PARAM_1, PARAM_2> > other,
3138 BloombergLP::bslma::Allocator *basicAllocator)
3139:
FirstBase(MovUtil::move(MovUtil::access(other).first),
3142,
SecondBase(MovUtil::move(MovUtil::access(other).second),
3149#ifndef BDE_OMIT_INTERNAL_DEPRECATED
3150template <
class T1,
class T2>
3151template <
class PARAM_1,
class PARAM_2>
3154 const BloombergLP::bslma::ManagedPtr_PairProxy<PARAM_1, PARAM_2>& rhs)
3162#if !defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
3163template <
class T1,
class T2>
3168 first = MovUtil::move(lvalue.
first);
3169 second = MovUtil::move(lvalue.
second);
3174template <
class T1,
class T2>
3175template <
class PARAM_1,
class PARAM_2>
3184#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
3185template <
class T1,
class T2>
3186template <
class PARAM_1,
class PARAM_2>
3189 first = MovUtil::move(rhs.first);
3190 second = MovUtil::move(rhs.second);
3194template <
class T1,
class T2>
3195template <
class PARAM_1,
class PARAM_2>
3200 first = MovUtil::move(lvalue.
first);
3201 second = MovUtil::move(lvalue.
second);
3206template <
class T1,
class T2>
3207template <
class PARAM_1,
class PARAM_2>
3213 second = rhs.second;
3217#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE)
3218template <
class T1,
class T2>
3219template <
class PARAM_1,
class PARAM_2,
3226 return std::tuple<PARAM_1&, PARAM_2&>(first, second);
3229template <
class T1,
class T2>
3230template <
class PARAM_1,
3234pair<T1, T2>::operator std::tuple<PARAM_1&, decltype(std::ignore)&>()
3237 return std::tuple<PARAM_1&, decltype(std::ignore)&>(first, std::ignore);
3240template <
class T1,
class T2>
3241template <
class PARAM_2,
3245pair<T1, T2>::operator std::tuple<decltype(std::ignore)&, PARAM_2&>()
3248 return std::tuple<decltype(std::ignore)&, PARAM_2&>(std::ignore, second);
3253template <
class T1,
class T2>
3255#if defined(BSLSTL_PAIR_DO_NOT_SFINAE_TEST_IS_SWAPPABLE)
3256void pair<T1, T2>::swap(pair& other)
3259void pair<T1, T2>::swap(pair& other)
3261 && bsl::is_nothrow_swappable<T2>::value)
3269 swap(first, other.first);
3270 swap(second, other.second);
3274template <
class T1,
class T2>
3282#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
3283template <
class T1,
class T2>
3288 return ! (lhs == rhs);
3292#ifdef BSLALG_SYNTHTHREEWAYUTIL_AVAILABLE
3294template <
class T1,
class T2>
3296std::common_comparison_category_t<
3297 BloombergLP::bslalg::SynthThreeWayUtil::Result<T1>,
3298 BloombergLP::bslalg::SynthThreeWayUtil::Result<T2>
3299> operator<=>(
const pair<T1, T2>& lhs,
const pair<T1, T2>& rhs)
3301 using BloombergLP::bslalg::SynthThreeWayUtil;
3302 auto result = SynthThreeWayUtil::compare(lhs.first, rhs.first);
3303 return result == 0 ? SynthThreeWayUtil::compare(lhs.second, rhs.second)
3309template <
class T1,
class T2>
3319template <
class T1,
class T2>
3327template <
class T1,
class T2>
3332 return ! (rhs < lhs);
3335template <
class T1,
class T2>
3340 return ! (lhs < rhs);
3346template <
class T1,
class T2>
3348#if defined(BSLSTL_PAIR_DO_NOT_SFINAE_TEST_IS_SWAPPABLE)
3352 && bsl::is_swappable<T2>::value>::type
3361template <
class HASHALG,
class T1,
class T2>
3364 using ::BloombergLP::bslh::hashAppend;
3371#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE)
3380template <
class T1,
class T2>
3388template <
class T1,
class T2>
3397#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
3398template <
class T1,
class T2>
3403 return std::move(p.first);
3406template <
class T1,
class T2>
3412 return std::move(p.first);
3416template <
class T1,
class T2>
3424template <
class T1,
class T2>
3433#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
3434template <
class T1,
class T2>
3439 return std::move(p.second);
3442template <
class T1,
class T2>
3448 return std::move(p.second);
3457template<std::
size_t INDEX,
class T1,
class T2>
3459typename std::tuple_element<INDEX, bsl::pair<T1, T2> >::type&
3462 return BloombergLP::bslstl::Pair_GetImpUtil<INDEX, T1, T2>::getPairElement(
3466template<std::
size_t INDEX,
class T1,
class T2>
3468const typename std::tuple_element<INDEX, bsl::pair<T1, T2> >::type&
3471 return BloombergLP::bslstl::Pair_GetImpUtil<INDEX, T1, T2>::getPairElement(
3475#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
3476template<std::
size_t INDEX,
class T1,
class T2>
3478typename std::tuple_element<INDEX, bsl::pair<T1, T2> >::type&&
3481 return BloombergLP::bslstl::Pair_GetImpUtil<INDEX, T1, T2>::getPairElement(
3486template<
class TYPE,
class T1,
class T2>
3490 return BloombergLP::bslstl::Pair_GetImpUtil<
3491 BloombergLP::bslstl::Pair_IndexOfType<TYPE, T1, T2>::value, T1, T2>
3492 ::getPairElement(p);
3495template<
class TYPE,
class T1,
class T2>
3499 return BloombergLP::bslstl::Pair_GetImpUtil<
3500 BloombergLP::bslstl::Pair_IndexOfType<TYPE, T1, T2>::value, T1, T2>
3501 ::getPairElement(p);
3504#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
3505template<
class TYPE,
class T1,
class T2>
3509 return BloombergLP::bslstl::Pair_GetImpUtil<
3510 BloombergLP::bslstl::Pair_IndexOfType<TYPE, T1, T2>::value, T1, T2>
3511 ::getPairElement(std::move(p));
3514template<
class TYPE,
class T1,
class T2>
3518 return BloombergLP::bslstl::Pair_GetImpUtil<
3519 BloombergLP::bslstl::Pair_IndexOfType<TYPE, T1, T2>::value, T1, T2>
3520 ::getPairElement(std::move(p));
3532template <
class T1,
class T2>
3535 && is_trivially_copyable<T2>::value>
3538template <
class T1,
class T2>
3541 && is_trivially_default_constructible<T2>::value>
3549template <
class T1,
class T2>
3552 && IsBitwiseCopyable<T2>::value>
3555template <
class T1,
class T2>
3562template <
class T1,
class T2>
3565 && bslmf::IsBitwiseMoveable<T2>::value>
3568template <
class T1,
class T2>
3571 && bslmf::IsBitwiseEqualityComparable<T2>::value
3572 && sizeof(T1) + sizeof(T2) ==
3573 sizeof(bsl::pair<T1, T2>)>
3580template <
class T1,
class T2>
3583 || UsesBslmaAllocator<T2>::value>
3590#ifdef BSLSTL_PAIR_DO_NOT_SFINAE_TEST_IS_SWAPPABLE
3591#undef BSLSTL_PAIR_DO_NOT_SFINAE_TEST_IS_SWAPPABLE
Definition bslstl_pair.h:1210
pair & operator=(const std::pair< PARAM_1, PARAM_2 > &rhs)
BSLS_KEYWORD_CONSTEXPR pair(BloombergLP::bslmf::MovableRef< pair< PARAM_1, PARAM_2 > > other, typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value, SfinaeEnable >::type=SfinaeEnable())
Definition bslstl_pair.h:1493
pair(const PARAM_1 &a, PARAM_2 &b, BloombergLP::bslma::Allocator *basicAllocator)
Definition bslstl_pair.h:2898
pair(BloombergLP::bslmf::MovableRef< std::pair< PARAM_1, PARAM_2 > > other, BloombergLP::bslma::Allocator *basicAllocator)
Definition bslstl_pair.h:3136
pair(typename bsl::add_lvalue_reference< const T1 >::type a, typename bsl::add_lvalue_reference< const T2 >::type b, BloombergLP::bslma::Allocator *basicAllocator)
Definition bslstl_pair.h:2848
pair(const PARAM_1 &a, const PARAM_2 &b, BloombergLP::bslma::Allocator *basicAllocator)
Definition bslstl_pair.h:2876
BSLS_KEYWORD_CONSTEXPR pair(BloombergLP::bslmf::MovableRef< std::pair< PARAM_1, PARAM_2 > > other, typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value, SfinaeEnable >::type=SfinaeEnable())
Definition bslstl_pair.h:1508
T1 first_type
Definition bslstl_pair.h:1231
BSLS_KEYWORD_CONSTEXPR pair(const std::pair< PARAM_1, PARAM_2 > &other, typename bsl::enable_if< std::is_constructible< T1, const PARAM_1 & >::value &&std::is_constructible< T2, const PARAM_2 & >::value, SfinaeEnable >::type=SfinaeEnable())
Definition bslstl_pair.h:3025
pair(BloombergLP::bslma::Allocator *basicAllocator)
Definition bslstl_pair.h:2830
BSLS_KEYWORD_CONSTEXPR pair(const BloombergLP::bslma::ManagedPtr_PairProxy< PARAM_1, PARAM_2 > &rhs)
Definition bslstl_pair.h:3153
pair & operator=(const pair< PARAM_1, PARAM_2 > &rhs)
pair(BloombergLP::bslmf::MovableRef< pair< PARAM_1, PARAM_2 > > other, BloombergLP::bslma::Allocator *basicAllocator)
Definition bslstl_pair.h:3122
pair(PARAM_1 &a, const PARAM_2 &b, BloombergLP::bslma::Allocator *basicAllocator)
Definition bslstl_pair.h:2887
BSLS_KEYWORD_CONSTEXPR pair(BloombergLP::bslmf::MovableRef< pair > original)
Definition bslstl_pair.h:2984
BSLS_KEYWORD_CONSTEXPR pair(const PARAM_1 &a, PARAM_2 &b, typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value &&!(bsl::is_pointer< typename bsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), SfinaeEnable >::type=SfinaeEnable())
Definition bslstl_pair.h:1371
BSLS_KEYWORD_CONSTEXPR pair(const PARAM_1 &a, const PARAM_2 &b, typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value &&!(bsl::is_pointer< typename bsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), SfinaeEnable >::type=SfinaeEnable())
Definition bslstl_pair.h:1323
pair(BloombergLP::bslmf::MovableRef< pair > original, BloombergLP::bslma::Allocator *basicAllocator)
Definition bslstl_pair.h:2993
BSLS_KEYWORD_CONSTEXPR pair(typename bsl::add_lvalue_reference< const T1 >::type a, typename bsl::add_lvalue_reference< const T2 >::type b)
Definition bslstl_pair.h:2839
BSLS_KEYWORD_CONSTEXPR pair(PARAM_1 &a, const PARAM_2 &b, typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value &&!(bsl::is_pointer< typename bsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), SfinaeEnable >::type=SfinaeEnable())
Definition bslstl_pair.h:1347
pair(const pair< PARAM_1, PARAM_2 > &other, BloombergLP::bslma::Allocator *basicAllocator)
Definition bslstl_pair.h:3060
pair(const std::pair< PARAM_1, PARAM_2 > &other, BloombergLP::bslma::Allocator *basicAllocator)
Definition bslstl_pair.h:3070
T2 second_type
Definition bslstl_pair.h:1232
pair(const pair &original, BloombergLP::bslma::Allocator *basicAllocator)
Definition bslstl_pair.h:2960
pair & operator=(BloombergLP::bslmf::MovableRef< pair > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(false)
Definition bslstl_pair.h:3164
BSLS_KEYWORD_CONSTEXPR pair(const pair< PARAM_1, PARAM_2 > &other, typename bsl::enable_if< std::is_constructible< T1, const PARAM_1 & >::value &&std::is_constructible< T2, const PARAM_2 & >::value, SfinaeEnable >::type=SfinaeEnable())
Definition bslstl_pair.h:3010
BSLS_KEYWORD_CONSTEXPR pair()
Definition bslstl_pair.h:2821
pair(PARAM_1 &a, PARAM_2 &b, BloombergLP::bslma::Allocator *basicAllocator)
Definition bslstl_pair.h:2909
BSLS_KEYWORD_CONSTEXPR pair(PARAM_1 &a, PARAM_2 &b, typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value &&!(bsl::is_pointer< typename bsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), SfinaeEnable >::type=SfinaeEnable())
Definition bslstl_pair.h:1395
pair & operator=(BloombergLP::bslmf::MovableRef< pair< PARAM_1, PARAM_2 > > rhs)
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:229
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2012
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2018
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_NOEXCEPT_OPERATOR(...)
Definition bsls_keyword.h:635
#define BSLS_KEYWORD_CONSTEXPR
Definition bsls_keyword.h:588
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:632
#define BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(...)
Definition bsls_keyword.h:634
void swap(OptionValue &a, OptionValue &b)
Definition bdlb_printmethods.h:283
void hashAppend(HASH_ALGORITHM &hashAlgorithm, const array< TYPE, SIZE > &input)
Pass the specified input to the specified hashAlgorithm
Definition bslstl_array.h:950
BSLS_KEYWORD_CONSTEXPR_CPP14 TYPE & get(array< TYPE, SIZE > &a) BSLS_KEYWORD_NOEXCEPT
bsl::integral_constant< int, 0 > Pair_BslmaIdiomNone
Definition bslstl_pair.h:460
bsl::integral_constant< int, 2 > Pair_BslmaIdiomAllocatorArgT
Definition bslstl_pair.h:469
bsl::integral_constant< int, 1 > Pair_BslmaIdiomAtEnd
Definition bslstl_pair.h:464
Definition balxml_encoderoptions.h:68
Definition bdlbb_blob.h:576
Definition bslstl_algorithm.h:82
Definition bdldfp_decimal.h:5188
void swap(TYPE &a, TYPE &b)
Definition bslstl_pair.h:486
TYPE & first
Definition bslstl_pair.h:748
Definition bslstl_pair.h:587
Pair_First & operator=(Pair_First &&)=default
Pair_First(const Pair_First &)=default
BSLS_KEYWORD_CONSTEXPR Pair_First(PARAM &value)
Definition bslstl_pair.h:2193
Pair_First(const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT)
Definition bslstl_pair.h:2275
Pair_First(PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT)
Definition bslstl_pair.h:2285
Pair_First(BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT)
Definition bslstl_pair.h:2149
Pair_First(PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd)
Definition bslstl_pair.h:2265
Pair_First(PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone)
Definition bslstl_pair.h:2245
Pair_First(Pair_First &&)=default
BSLS_KEYWORD_CONSTEXPR Pair_First(const PARAM &value)
Definition bslstl_pair.h:2184
BSLS_KEYWORD_CONSTEXPR Pair_First(typename bsl::add_lvalue_reference< const TYPE >::type value)
Definition bslstl_pair.h:2158
Pair_First(const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone)
Definition bslstl_pair.h:2235
Pair_First(BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd)
Definition bslstl_pair.h:2141
BSLS_KEYWORD_CONSTEXPR Pair_First()
Definition bslstl_pair.h:2125
Pair_First(const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd)
Definition bslstl_pair.h:2255
TYPE first
Definition bslstl_pair.h:605
Pair_First(BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone)
Definition bslstl_pair.h:2133
Definition bslstl_pair.h:506
TYPE & second
Definition bslstl_pair.h:1050
Definition bslstl_pair.h:891
Pair_Second(PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT)
Definition bslstl_pair.h:2635
BSLS_KEYWORD_CONSTEXPR Pair_Second()
Definition bslstl_pair.h:2476
Pair_Second(BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd)
Definition bslstl_pair.h:2492
Pair_Second(const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT)
Definition bslstl_pair.h:2625
Pair_Second(const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd)
Definition bslstl_pair.h:2605
Pair_Second(PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd)
Definition bslstl_pair.h:2615
Pair_Second(Pair_Second &&)=default
TYPE second
Definition bslstl_pair.h:908
Pair_Second(PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone)
Definition bslstl_pair.h:2595
BSLS_KEYWORD_CONSTEXPR Pair_Second(PARAM &value)
Definition bslstl_pair.h:2543
Pair_Second(BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT)
Definition bslstl_pair.h:2500
Pair_Second(const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone)
Definition bslstl_pair.h:2585
Pair_Second(const Pair_Second &)=default
BSLS_KEYWORD_CONSTEXPR Pair_Second(const PARAM &value)
Definition bslstl_pair.h:2535
Pair_Second(BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone)
Definition bslstl_pair.h:2484
Pair_Second & operator=(Pair_Second &&)=default
BSLS_KEYWORD_CONSTEXPR Pair_Second(typename bsl::add_lvalue_reference< const TYPE >::type value)
Definition bslstl_pair.h:2509
t_TYPE & type
This typedef defines the return type of this meta function.
Definition bslmf_addlvaluereference.h:129
Definition bslmf_enableif.h:525
Definition bslmf_integralconstant.h:244
Definition bslmf_isconvertible.h:867
Definition bslmf_ispointer.h:138
Definition bslmf_istriviallycopyable.h:329
Definition bslmf_istriviallydefaultconstructible.h:293
Definition bslma_usesbslmaallocator.h:343
Definition bslmf_isbitwisecopyable.h:298
Definition bslmf_isbitwiseequalitycomparable.h:499
Definition bslmf_isbitwisemoveable.h:718
Definition bslmf_ispair.h:88
Definition bslmf_movableref.h:791