751 using _TCC = _TupleConstraints<_Cond, _Elements...>;
754 template<
bool _Dummy>
755 using _ImplicitDefaultCtor = __enable_if_t<
756 _TCC<_Dummy>::__is_implicitly_default_constructible(),
760 template<
bool _Dummy>
761 using _ExplicitDefaultCtor = __enable_if_t<
762 _TCC<_Dummy>::__is_explicitly_default_constructible(),
766 template<
bool _Cond,
typename... _Args>
767 using _ImplicitCtor = __enable_if_t<
768 _TCC<_Cond>::template __is_implicitly_constructible<_Args...>(),
772 template<
bool _Cond,
typename... _Args>
773 using _ExplicitCtor = __enable_if_t<
774 _TCC<_Cond>::template __is_explicitly_constructible<_Args...>(),
777 template<
typename... _UElements>
779 __enable_if_t<
sizeof...(_UElements) ==
sizeof...(_Elements),
bool>
781 {
return __and_<is_assignable<_Elements&, _UElements>...>::value; }
784 template<
typename... _UElements>
785 static constexpr bool __nothrow_assignable()
788 __and_<is_nothrow_assignable<_Elements&, _UElements>...>::value;
792 template<
typename... _UElements>
793 static constexpr bool __nothrow_constructible()
796 __and_<is_nothrow_constructible<_Elements, _UElements>...>::value;
800 template<
typename _Up>
801 static constexpr bool __valid_args()
803 return sizeof...(_Elements) == 1
808 template<
typename,
typename,
typename... _Tail>
809 static constexpr bool __valid_args()
810 {
return (
sizeof...(_Tail) + 2) ==
sizeof...(_Elements); }
821 template<
typename _Tuple,
typename =
tuple,
822 typename = __remove_cvref_t<_Tuple>>
828 template<
typename _Tuple,
typename _Tp,
typename _Up>
829 struct _UseOtherCtor<_Tuple,
tuple<_Tp>,
tuple<_Up>>
830 : __or_<is_convertible<_Tuple, _Tp>, is_constructible<_Tp, _Tuple>>::type
834 template<
typename _Tuple,
typename _Tp>
835 struct _UseOtherCtor<_Tuple,
tuple<_Tp>,
tuple<_Tp>>
842 template<
typename _Tuple>
843 static constexpr bool __use_other_ctor()
844 {
return _UseOtherCtor<_Tuple>::value; }
846#if __cplusplus > 202002L
847 template<
typename... _Args>
848 static constexpr bool __constructible
849 = _TCC<true>::template __constructible<_Args...>::value;
851 template<
typename... _Args>
852 static constexpr bool __convertible
853 = _TCC<true>::template __convertible<_Args...>::value;
857 template<
typename _Dummy = void,
858 _ImplicitDefaultCtor<is_void<_Dummy>::value> =
true>
861 noexcept(__and_<is_nothrow_default_constructible<_Elements>...>::value)
864 template<
typename _Dummy = void,
865 _ExplicitDefaultCtor<is_void<_Dummy>::value> =
false>
868 noexcept(__and_<is_nothrow_default_constructible<_Elements>...>::value)
871 template<
bool _NotEmpty = (
sizeof...(_Elements) >= 1),
872 _ImplicitCtor<_NotEmpty,
const _Elements&...> =
true>
874 tuple(
const _Elements&... __elements)
875 noexcept(__nothrow_constructible<
const _Elements&...>())
878 template<
bool _NotEmpty = (
sizeof...(_Elements) >= 1),
879 _ExplicitCtor<_NotEmpty,
const _Elements&...> =
false>
881 tuple(
const _Elements&... __elements)
882 noexcept(__nothrow_constructible<
const _Elements&...>())
885 template<
typename... _UElements,
886 bool _Valid = __valid_args<_UElements...>(),
887 _ImplicitCtor<_Valid, _UElements...> =
true>
889 tuple(_UElements&&... __elements)
890 noexcept(__nothrow_constructible<_UElements...>())
891 :
_Inherited(std::forward<_UElements>(__elements)...) { }
893 template<
typename... _UElements,
894 bool _Valid = __valid_args<_UElements...>(),
895 _ExplicitCtor<_Valid, _UElements...> =
false>
897 tuple(_UElements&&... __elements)
898 noexcept(__nothrow_constructible<_UElements...>())
899 :
_Inherited(std::forward<_UElements>(__elements)...) { }
905 template<
typename... _UElements,
906 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
908 _ImplicitCtor<_Valid,
const _UElements&...> =
true>
911 noexcept(__nothrow_constructible<
const _UElements&...>())
915 template<
typename... _UElements,
916 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
918 _ExplicitCtor<_Valid,
const _UElements&...> =
false>
921 noexcept(__nothrow_constructible<
const _UElements&...>())
925 template<
typename... _UElements,
926 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
928 _ImplicitCtor<_Valid, _UElements...> =
true>
931 noexcept(__nothrow_constructible<_UElements...>())
934 template<
typename... _UElements,
935 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
937 _ExplicitCtor<_Valid, _UElements...> =
false>
940 noexcept(__nothrow_constructible<_UElements...>())
943#if __cplusplus > 202002L
944 template<
typename... _UElements>
945 requires (
sizeof...(_Elements) ==
sizeof...(_UElements))
947 && __constructible<_UElements&...>
948 explicit(!__convertible<_UElements&...>)
951 noexcept(__nothrow_constructible<_UElements&...>())
955 template<
typename... _UElements>
956 requires (
sizeof...(_Elements) ==
sizeof...(_UElements))
958 && __constructible<const _UElements...>
959 explicit(!__convertible<const _UElements...>)
962 noexcept(__nothrow_constructible<
const _UElements...>())
968 template<
typename _Alloc,
969 _ImplicitDefaultCtor<is_object<_Alloc>::value> =
true>
971 tuple(allocator_arg_t __tag,
const _Alloc& __a)
974 template<
typename _Alloc,
975 _ExplicitDefaultCtor<is_object<_Alloc>::value> =
false>
978 tuple(allocator_arg_t __tag,
const _Alloc& __a)
981 template<
typename _Alloc,
bool _NotEmpty = (
sizeof...(_Elements) >= 1),
982 _ImplicitCtor<_NotEmpty,
const _Elements&...> =
true>
984 tuple(allocator_arg_t __tag,
const _Alloc& __a,
985 const _Elements&... __elements)
988 template<
typename _Alloc,
bool _NotEmpty = (
sizeof...(_Elements) >= 1),
989 _ExplicitCtor<_NotEmpty,
const _Elements&...> =
false>
992 tuple(allocator_arg_t __tag,
const _Alloc& __a,
993 const _Elements&... __elements)
996 template<
typename _Alloc,
typename... _UElements,
997 bool _Valid = __valid_args<_UElements...>(),
998 _ImplicitCtor<_Valid, _UElements...> =
true>
1000 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1001 _UElements&&... __elements)
1002 :
_Inherited(__tag, __a, std::forward<_UElements>(__elements)...)
1005 template<
typename _Alloc,
typename... _UElements,
1006 bool _Valid = __valid_args<_UElements...>(),
1007 _ExplicitCtor<_Valid, _UElements...> =
false>
1008 _GLIBCXX20_CONSTEXPR
1010 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1011 _UElements&&... __elements)
1012 :
_Inherited(__tag, __a, std::forward<_UElements>(__elements)...)
1015 template<
typename _Alloc>
1016 _GLIBCXX20_CONSTEXPR
1017 tuple(allocator_arg_t __tag,
const _Alloc& __a,
const tuple& __in)
1020 template<
typename _Alloc>
1021 _GLIBCXX20_CONSTEXPR
1022 tuple(allocator_arg_t __tag,
const _Alloc& __a,
tuple&& __in)
1025 template<
typename _Alloc,
typename... _UElements,
1026 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
1028 _ImplicitCtor<_Valid,
const _UElements&...> =
true>
1029 _GLIBCXX20_CONSTEXPR
1030 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1033 static_cast<const _Tuple_impl<0, _UElements...
>&>(__in))
1036 template<
typename _Alloc,
typename... _UElements,
1037 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
1039 _ExplicitCtor<_Valid,
const _UElements&...> =
false>
1040 _GLIBCXX20_CONSTEXPR
1042 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1045 static_cast<const _Tuple_impl<0, _UElements...
>&>(__in))
1048 template<
typename _Alloc,
typename... _UElements,
1049 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
1051 _ImplicitCtor<_Valid, _UElements...> =
true>
1052 _GLIBCXX20_CONSTEXPR
1053 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1056 static_cast<_Tuple_impl<0, _UElements...
>&&>(__in))
1059 template<
typename _Alloc,
typename... _UElements,
1060 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
1062 _ExplicitCtor<_Valid, _UElements...> =
false>
1063 _GLIBCXX20_CONSTEXPR
1065 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1068 static_cast<_Tuple_impl<0, _UElements...
>&&>(__in))
1071#if __cplusplus > 202002L
1072 template<
typename _Alloc,
typename... _UElements>
1073 requires (
sizeof...(_Elements) ==
sizeof...(_UElements))
1075 && __constructible<_UElements&...>
1076 explicit(!__convertible<_UElements&...>)
1078 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1081 static_cast<_Tuple_impl<0, _UElements...
>&>(__in))
1084 template<
typename _Alloc,
typename... _UElements>
1085 requires (
sizeof...(_Elements) ==
sizeof...(_UElements))
1087 && __constructible<const _UElements...>
1088 explicit(!__convertible<const _UElements...>)
1090 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1093 static_cast<const _Tuple_impl<0, _UElements...
>&&>(__in))
1099 _GLIBCXX20_CONSTEXPR
1101 operator=(__conditional_t<__assignable<const _Elements&...>(),
1103 const __nonesuch&> __in)
1104 noexcept(__nothrow_assignable<
const _Elements&...>())
1106 this->_M_assign(__in);
1110 _GLIBCXX20_CONSTEXPR
1112 operator=(__conditional_t<__assignable<_Elements...>(),
1115 noexcept(__nothrow_assignable<_Elements...>())
1121 template<
typename... _UElements>
1122 _GLIBCXX20_CONSTEXPR
1123 __enable_if_t<__assignable<
const _UElements&...>(),
tuple&>
1125 noexcept(__nothrow_assignable<
const _UElements&...>())
1127 this->_M_assign(__in);
1131 template<
typename... _UElements>
1132 _GLIBCXX20_CONSTEXPR
1133 __enable_if_t<__assignable<_UElements...>(),
tuple&>
1135 noexcept(__nothrow_assignable<_UElements...>())
1141#if __cplusplus > 202002L
1142 constexpr const tuple&
1143 operator=(
const tuple& __in)
const
1144 requires (is_copy_assignable_v<const _Elements> && ...)
1146 this->_M_assign(__in);
1150 constexpr const tuple&
1151 operator=(
tuple&& __in)
const
1152 requires (is_assignable_v<const _Elements&, _Elements> && ...)
1158 template<
typename... _UElements>
1159 constexpr const tuple&
1161 requires (
sizeof...(_Elements) ==
sizeof...(_UElements))
1162 && (is_assignable_v<const _Elements&, const _UElements&> && ...)
1164 this->_M_assign(__in);
1168 template<
typename... _UElements>
1169 constexpr const tuple&
1171 requires (
sizeof...(_Elements) ==
sizeof...(_UElements))
1172 && (is_assignable_v<const _Elements&, _UElements> && ...)
1180 _GLIBCXX20_CONSTEXPR
1183 noexcept(__and_<__is_nothrow_swappable<_Elements>...>::value)
1184 { _Inherited::_M_swap(__in); }
1186#if __cplusplus > 202002L
1194 swap(
const tuple& __in)
const
1195 noexcept(__and_v<__is_nothrow_swappable<const _Elements>...>)
1196 requires (is_swappable_v<const _Elements> && ...)
1197 { _Inherited::_M_swap(__in); }
1244 template<
bool _Dummy,
typename _U1,
typename _U2>
1245 using _ImplicitDefaultCtor = __enable_if_t<
1246 _TupleConstraints<_Dummy, _U1, _U2>::
1247 __is_implicitly_default_constructible(),
1251 template<
bool _Dummy,
typename _U1,
typename _U2>
1252 using _ExplicitDefaultCtor = __enable_if_t<
1253 _TupleConstraints<_Dummy, _U1, _U2>::
1254 __is_explicitly_default_constructible(),
1257 template<
bool _Dummy>
1258 using _TCC = _TupleConstraints<_Dummy, _T1, _T2>;
1261 template<
bool _Cond,
typename _U1,
typename _U2>
1262 using _ImplicitCtor = __enable_if_t<
1263 _TCC<_Cond>::template __is_implicitly_constructible<_U1, _U2>(),
1267 template<
bool _Cond,
typename _U1,
typename _U2>
1268 using _ExplicitCtor = __enable_if_t<
1269 _TCC<_Cond>::template __is_explicitly_constructible<_U1, _U2>(),
1272 template<
typename _U1,
typename _U2>
1273 static constexpr bool __assignable()
1275 return __and_<is_assignable<_T1&, _U1>,
1279 template<
typename _U1,
typename _U2>
1280 static constexpr bool __nothrow_assignable()
1282 return __and_<is_nothrow_assignable<_T1&, _U1>,
1286 template<
typename _U1,
typename _U2>
1287 static constexpr bool __nothrow_constructible()
1289 return __and_<is_nothrow_constructible<_T1, _U1>,
1293 static constexpr bool __nothrow_default_constructible()
1295 return __and_<is_nothrow_default_constructible<_T1>,
1299 template<
typename _U1>
1300 static constexpr bool __is_alloc_arg()
1303#if __cplusplus > 202002L
1304 template<
typename _U1,
typename _U2>
1305 static constexpr bool __constructible
1306 = _TCC<true>::template __constructible<_U1, _U2>::value;
1308 template<
typename _U1,
typename _U2>
1309 static constexpr bool __convertible
1310 = _TCC<true>::template __convertible<_U1, _U2>::value;
1314 template<
bool _Dummy =
true,
1315 _ImplicitDefaultCtor<_Dummy, _T1, _T2> =
true>
1318 noexcept(__nothrow_default_constructible())
1321 template<
bool _Dummy =
true,
1322 _ExplicitDefaultCtor<_Dummy, _T1, _T2> =
false>
1325 noexcept(__nothrow_default_constructible())
1328 template<
bool _Dummy =
true,
1329 _ImplicitCtor<_Dummy, const _T1&, const _T2&> =
true>
1331 tuple(
const _T1& __a1,
const _T2& __a2)
1332 noexcept(__nothrow_constructible<const _T1&, const _T2&>())
1335 template<
bool _Dummy =
true,
1336 _ExplicitCtor<_Dummy, const _T1&, const _T2&> =
false>
1338 tuple(
const _T1& __a1,
const _T2& __a2)
1339 noexcept(__nothrow_constructible<const _T1&, const _T2&>())
1342 template<
typename _U1,
typename _U2,
1343 _ImplicitCtor<!__is_alloc_arg<_U1>(), _U1, _U2> =
true>
1345 tuple(_U1&& __a1, _U2&& __a2)
1346 noexcept(__nothrow_constructible<_U1, _U2>())
1347 :
_Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { }
1349 template<
typename _U1,
typename _U2,
1350 _ExplicitCtor<!__is_alloc_arg<_U1>(), _U1, _U2> =
false>
1352 tuple(_U1&& __a1, _U2&& __a2)
1353 noexcept(__nothrow_constructible<_U1, _U2>())
1354 :
_Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { }
1360 template<
typename _U1,
typename _U2,
1361 _ImplicitCtor<true, const _U1&, const _U2&> =
true>
1364 noexcept(__nothrow_constructible<const _U1&, const _U2&>())
1367 template<
typename _U1,
typename _U2,
1368 _ExplicitCtor<true, const _U1&, const _U2&> =
false>
1371 noexcept(__nothrow_constructible<const _U1&, const _U2&>())
1374 template<
typename _U1,
typename _U2,
1375 _ImplicitCtor<true, _U1, _U2> =
true>
1378 noexcept(__nothrow_constructible<_U1, _U2>())
1381 template<
typename _U1,
typename _U2,
1382 _ExplicitCtor<true, _U1, _U2> =
false>
1385 noexcept(__nothrow_constructible<_U1, _U2>())
1388#if __cplusplus > 202002L
1389 template<
typename _U1,
typename _U2>
1390 requires __constructible<_U1&, _U2&>
1391 explicit(!__convertible<_U1&, _U2&>)
1394 noexcept(__nothrow_constructible<_U1&, _U2&>())
1397 template<
typename _U1,
typename _U2>
1398 requires __constructible<const _U1, const _U2>
1399 explicit(!__convertible<const _U1, const _U2>)
1402 noexcept(__nothrow_constructible<const _U1, const _U2>())
1406 template<
typename _U1,
typename _U2,
1407 _ImplicitCtor<true, const _U1&, const _U2&> =
true>
1410 noexcept(__nothrow_constructible<const _U1&, const _U2&>())
1413 template<
typename _U1,
typename _U2,
1414 _ExplicitCtor<true, const _U1&, const _U2&> =
false>
1417 noexcept(__nothrow_constructible<const _U1&, const _U2&>())
1420 template<
typename _U1,
typename _U2,
1421 _ImplicitCtor<true, _U1, _U2> =
true>
1424 noexcept(__nothrow_constructible<_U1, _U2>())
1426 std::forward<_U2>(__in.second)) { }
1428 template<
typename _U1,
typename _U2,
1429 _ExplicitCtor<true, _U1, _U2> =
false>
1432 noexcept(__nothrow_constructible<_U1, _U2>())
1434 std::forward<_U2>(__in.second)) { }
1436#if __cplusplus > 202002L
1437 template<
typename _U1,
typename _U2>
1438 requires __constructible<_U1&, _U2&>
1439 explicit(!__convertible<_U1&, _U2&>)
1442 noexcept(__nothrow_constructible<_U1&, _U2&>())
1445 template<
typename _U1,
typename _U2>
1446 requires __constructible<const _U1, const _U2>
1447 explicit(!__convertible<const _U1, const _U2>)
1450 noexcept(__nothrow_constructible<const _U1, const _U2>())
1451 :
_Inherited(std::forward<const _U1>(__in.first),
1452 std::forward<const _U2>(__in.second)) { }
1457 template<
typename _Alloc,
1458 _ImplicitDefaultCtor<is_object<_Alloc>::value, _T1, _T2> =
true>
1459 _GLIBCXX20_CONSTEXPR
1460 tuple(allocator_arg_t __tag,
const _Alloc& __a)
1463 template<
typename _Alloc,
1464 _ExplicitDefaultCtor<is_object<_Alloc>::value, _T1, _T2> =
false>
1465 _GLIBCXX20_CONSTEXPR
1467 tuple(allocator_arg_t __tag,
const _Alloc& __a)
1470 template<
typename _Alloc,
bool _Dummy =
true,
1471 _ImplicitCtor<_Dummy, const _T1&, const _T2&> =
true>
1472 _GLIBCXX20_CONSTEXPR
1473 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1474 const _T1& __a1,
const _T2& __a2)
1477 template<
typename _Alloc,
bool _Dummy =
true,
1478 _ExplicitCtor<_Dummy, const _T1&, const _T2&> =
false>
1480 _GLIBCXX20_CONSTEXPR
1481 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1482 const _T1& __a1,
const _T2& __a2)
1485 template<
typename _Alloc,
typename _U1,
typename _U2,
1486 _ImplicitCtor<true, _U1, _U2> =
true>
1487 _GLIBCXX20_CONSTEXPR
1488 tuple(allocator_arg_t __tag,
const _Alloc& __a, _U1&& __a1, _U2&& __a2)
1489 :
_Inherited(__tag, __a, std::forward<_U1>(__a1),
1490 std::forward<_U2>(__a2)) { }
1492 template<
typename _Alloc,
typename _U1,
typename _U2,
1493 _ExplicitCtor<true, _U1, _U2> =
false>
1495 _GLIBCXX20_CONSTEXPR
1496 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1497 _U1&& __a1, _U2&& __a2)
1498 :
_Inherited(__tag, __a, std::forward<_U1>(__a1),
1499 std::forward<_U2>(__a2)) { }
1501 template<
typename _Alloc>
1502 _GLIBCXX20_CONSTEXPR
1503 tuple(allocator_arg_t __tag,
const _Alloc& __a,
const tuple& __in)
1506 template<
typename _Alloc>
1507 _GLIBCXX20_CONSTEXPR
1508 tuple(allocator_arg_t __tag,
const _Alloc& __a,
tuple&& __in)
1511 template<
typename _Alloc,
typename _U1,
typename _U2,
1512 _ImplicitCtor<true, const _U1&, const _U2&> =
true>
1513 _GLIBCXX20_CONSTEXPR
1514 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1520 template<
typename _Alloc,
typename _U1,
typename _U2,
1521 _ExplicitCtor<true, const _U1&, const _U2&> =
false>
1523 _GLIBCXX20_CONSTEXPR
1524 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1530 template<
typename _Alloc,
typename _U1,
typename _U2,
1531 _ImplicitCtor<true, _U1, _U2> =
true>
1532 _GLIBCXX20_CONSTEXPR
1537 template<
typename _Alloc,
typename _U1,
typename _U2,
1538 _ExplicitCtor<true, _U1, _U2> =
false>
1540 _GLIBCXX20_CONSTEXPR
1545#if __cplusplus > 202002L
1546 template<
typename _Alloc,
typename _U1,
typename _U2>
1547 requires __constructible<_U1&, _U2&>
1548 explicit(!__convertible<_U1&, _U2&>)
1550 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1556 template<
typename _Alloc,
typename _U1,
typename _U2>
1557 requires __constructible<const _U1, const _U2>
1558 explicit(!__convertible<const _U1, const _U2>)
1560 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1567 template<
typename _Alloc,
typename _U1,
typename _U2,
1568 _ImplicitCtor<true, const _U1&, const _U2&> =
true>
1569 _GLIBCXX20_CONSTEXPR
1570 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1572 :
_Inherited(__tag, __a, __in.first, __in.second) { }
1574 template<
typename _Alloc,
typename _U1,
typename _U2,
1575 _ExplicitCtor<true, const _U1&, const _U2&> =
false>
1577 _GLIBCXX20_CONSTEXPR
1578 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1580 :
_Inherited(__tag, __a, __in.first, __in.second) { }
1582 template<
typename _Alloc,
typename _U1,
typename _U2,
1583 _ImplicitCtor<true, _U1, _U2> =
true>
1584 _GLIBCXX20_CONSTEXPR
1586 :
_Inherited(__tag, __a, std::forward<_U1>(__in.first),
1587 std::forward<_U2>(__in.second)) { }
1589 template<
typename _Alloc,
typename _U1,
typename _U2,
1590 _ExplicitCtor<true, _U1, _U2> =
false>
1592 _GLIBCXX20_CONSTEXPR
1594 :
_Inherited(__tag, __a, std::forward<_U1>(__in.first),
1595 std::forward<_U2>(__in.second)) { }
1597#if __cplusplus > 202002L
1598 template<
typename _Alloc,
typename _U1,
typename _U2>
1599 requires __constructible<_U1&, _U2&>
1600 explicit(!__convertible<_U1&, _U2&>)
1602 tuple(allocator_arg_t __tag,
const _Alloc& __a,
1604 :
_Inherited(__tag, __a, __in.first, __in.second) { }
1606 template<
typename _Alloc,
typename _U1,
typename _U2>
1607 requires __constructible<const _U1, const _U2>
1608 explicit(!__convertible<const _U1, const _U2>)
1611 :
_Inherited(__tag, __a, std::forward<const _U1>(__in.first),
1612 std::forward<const _U2>(__in.second)) { }
1617 _GLIBCXX20_CONSTEXPR
1619 operator=(__conditional_t<__assignable<const _T1&, const _T2&>(),
1621 const __nonesuch&> __in)
1622 noexcept(__nothrow_assignable<const _T1&, const _T2&>())
1624 this->_M_assign(__in);
1628 _GLIBCXX20_CONSTEXPR
1630 operator=(__conditional_t<__assignable<_T1, _T2>(),
1633 noexcept(__nothrow_assignable<_T1, _T2>())
1639 template<
typename _U1,
typename _U2>
1640 _GLIBCXX20_CONSTEXPR
1641 __enable_if_t<__assignable<const _U1&, const _U2&>(),
tuple&>
1643 noexcept(__nothrow_assignable<const _U1&, const _U2&>())
1645 this->_M_assign(__in);
1649 template<
typename _U1,
typename _U2>
1650 _GLIBCXX20_CONSTEXPR
1651 __enable_if_t<__assignable<_U1, _U2>(),
tuple&>
1653 noexcept(__nothrow_assignable<_U1, _U2>())
1659#if __cplusplus > 202002L
1660 constexpr const tuple&
1661 operator=(
const tuple& __in)
const
1662 requires is_copy_assignable_v<const _T1> && is_copy_assignable_v<const _T2>
1664 this->_M_assign(__in);
1668 constexpr const tuple&
1669 operator=(
tuple&& __in)
const
1670 requires is_assignable_v<const _T1&, _T1> && is_assignable_v<const _T2, _T2>
1676 template<
typename _U1,
typename _U2>
1677 constexpr const tuple&
1679 requires is_assignable_v<const _T1&, const _U1&>
1680 && is_assignable_v<const _T2&, const _U2&>
1682 this->_M_assign(__in);
1686 template<
typename _U1,
typename _U2>
1687 constexpr const tuple&
1689 requires is_assignable_v<const _T1&, _U1>
1690 && is_assignable_v<const _T2&, _U2>
1697 template<
typename _U1,
typename _U2>
1698 _GLIBCXX20_CONSTEXPR
1699 __enable_if_t<__assignable<const _U1&, const _U2&>(),
tuple&>
1701 noexcept(__nothrow_assignable<const _U1&, const _U2&>())
1703 this->_M_head(*
this) = __in.first;
1704 this->_M_tail(*this)._M_head(*
this) = __in.second;
1708 template<
typename _U1,
typename _U2>
1709 _GLIBCXX20_CONSTEXPR
1710 __enable_if_t<__assignable<_U1, _U2>(),
tuple&>
1712 noexcept(__nothrow_assignable<_U1, _U2>())
1714 this->_M_head(*
this) = std::forward<_U1>(__in.first);
1715 this->_M_tail(*this)._M_head(*
this) = std::forward<_U2>(__in.second);
1719#if __cplusplus > 202002L
1720 template<
typename _U1,
typename _U2>
1721 constexpr const tuple&
1723 requires is_assignable_v<const _T1&, const _U1&>
1724 && is_assignable_v<const _T2&, const _U2&>
1726 this->_M_head(*
this) = __in.first;
1727 this->_M_tail(*this)._M_head(*
this) = __in.second;
1731 template<
typename _U1,
typename _U2>
1732 constexpr const tuple&
1734 requires is_assignable_v<const _T1&, _U1>
1735 && is_assignable_v<const _T2&, _U2>
1737 this->_M_head(*
this) = std::forward<_U1>(__in.first);
1738 this->_M_tail(*this)._M_head(*
this) = std::forward<_U2>(__in.second);
1743 _GLIBCXX20_CONSTEXPR
1746 noexcept(__and_<__is_nothrow_swappable<_T1>,
1747 __is_nothrow_swappable<_T2>>::value)
1748 { _Inherited::_M_swap(__in); }
1750#if __cplusplus > 202002L
1752 swap(
const tuple& __in)
const
1753 noexcept(__and_v<__is_nothrow_swappable<const _T1>,
1754 __is_nothrow_swappable<const _T2>>)
1755 requires is_swappable_v<const _T1> && is_swappable_v<const _T2>
1756 { _Inherited::_M_swap(__in); }