29 #ifndef _GLIBCXX_TUPLE
30 #define _GLIBCXX_TUPLE 1
32 #pragma GCC system_header
34 #if __cplusplus < 201103L
40 #include <bits/uses_allocator.h>
42 #if __cplusplus > 201703L
44 # define __cpp_lib_constexpr_tuple 201811L
47 namespace std _GLIBCXX_VISIBILITY(default)
49 _GLIBCXX_BEGIN_NAMESPACE_VERSION
56 template<
typename... _Elements>
59 template<
typename _Tp>
60 struct __is_empty_non_tuple : is_empty<_Tp> { };
63 template<
typename _El0,
typename... _El>
64 struct __is_empty_non_tuple<tuple<_El0, _El...>> :
false_type { };
67 template<
typename _Tp>
68 using __empty_not_final
69 =
typename conditional<__is_final(_Tp),
false_type,
70 __is_empty_non_tuple<_Tp>>::type;
72 template<
size_t _Idx,
typename _Head,
73 bool = __empty_not_final<_Head>::value>
76 #if __has_cpp_attribute(__no_unique_address__)
77 template<
size_t _Idx,
typename _Head>
78 struct _Head_base<_Idx, _Head, true>
80 constexpr _Head_base()
83 constexpr _Head_base(
const _Head& __h)
84 : _M_head_impl(__h) { }
86 constexpr _Head_base(
const _Head_base&) =
default;
87 constexpr _Head_base(_Head_base&&) =
default;
89 template<
typename _UHead>
90 constexpr _Head_base(_UHead&& __h)
94 _Head_base(allocator_arg_t, __uses_alloc0)
97 template<
typename _Alloc>
98 _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a)
99 : _M_head_impl(allocator_arg, *__a._M_a) { }
101 template<
typename _Alloc>
102 _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a)
103 : _M_head_impl(*__a._M_a) { }
105 template<
typename _UHead>
107 _Head_base(__uses_alloc0, _UHead&& __uhead)
108 : _M_head_impl(
std::
forward<_UHead>(__uhead)) { }
110 template<
typename _Alloc,
typename _UHead>
111 _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead)
112 : _M_head_impl(allocator_arg, *__a._M_a,
std::
forward<_UHead>(__uhead))
115 template<
typename _Alloc,
typename _UHead>
116 _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead)
117 : _M_head_impl(
std::
forward<_UHead>(__uhead), *__a._M_a) { }
119 static constexpr _Head&
120 _M_head(_Head_base& __b) noexcept {
return __b._M_head_impl; }
122 static constexpr
const _Head&
123 _M_head(
const _Head_base& __b) noexcept {
return __b._M_head_impl; }
125 [[__no_unique_address__]] _Head _M_head_impl;
128 template<
size_t _Idx,
typename _Head>
129 struct _Head_base<_Idx, _Head, true>
132 constexpr _Head_base()
135 constexpr _Head_base(
const _Head& __h)
138 constexpr _Head_base(
const _Head_base&) =
default;
139 constexpr _Head_base(_Head_base&&) =
default;
141 template<
typename _UHead>
142 constexpr _Head_base(_UHead&& __h)
145 _Head_base(allocator_arg_t, __uses_alloc0)
148 template<
typename _Alloc>
149 _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a)
150 : _Head(allocator_arg, *__a._M_a) { }
152 template<
typename _Alloc>
153 _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a)
154 : _Head(*__a._M_a) { }
156 template<
typename _UHead>
157 _Head_base(__uses_alloc0, _UHead&& __uhead)
160 template<
typename _Alloc,
typename _UHead>
161 _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead)
162 : _Head(allocator_arg, *__a._M_a,
std::
forward<_UHead>(__uhead)) { }
164 template<
typename _Alloc,
typename _UHead>
165 _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead)
166 : _Head(
std::
forward<_UHead>(__uhead), *__a._M_a) { }
168 static constexpr _Head&
169 _M_head(_Head_base& __b) noexcept {
return __b; }
171 static constexpr
const _Head&
172 _M_head(
const _Head_base& __b) noexcept {
return __b; }
176 template<
size_t _Idx,
typename _Head>
177 struct _Head_base<_Idx, _Head, false>
179 constexpr _Head_base()
182 constexpr _Head_base(
const _Head& __h)
183 : _M_head_impl(__h) { }
185 constexpr _Head_base(
const _Head_base&) =
default;
186 constexpr _Head_base(_Head_base&&) =
default;
188 template<
typename _UHead>
189 constexpr _Head_base(_UHead&& __h)
193 _Head_base(allocator_arg_t, __uses_alloc0)
196 template<
typename _Alloc>
197 _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a)
198 : _M_head_impl(allocator_arg, *__a._M_a) { }
200 template<
typename _Alloc>
201 _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a)
202 : _M_head_impl(*__a._M_a) { }
204 template<
typename _UHead>
206 _Head_base(__uses_alloc0, _UHead&& __uhead)
207 : _M_head_impl(
std::
forward<_UHead>(__uhead)) { }
209 template<
typename _Alloc,
typename _UHead>
210 _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead)
211 : _M_head_impl(allocator_arg, *__a._M_a,
std::
forward<_UHead>(__uhead))
214 template<
typename _Alloc,
typename _UHead>
215 _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead)
216 : _M_head_impl(
std::
forward<_UHead>(__uhead), *__a._M_a) { }
218 static constexpr _Head&
219 _M_head(_Head_base& __b) noexcept {
return __b._M_head_impl; }
221 static constexpr
const _Head&
222 _M_head(
const _Head_base& __b) noexcept {
return __b._M_head_impl; }
235 template<
size_t _Idx,
typename... _Elements>
243 template<
size_t _Idx,
typename _Head,
typename... _Tail>
246 private _Head_base<_Idx, _Head>
248 template<size_t,
typename...>
friend struct _Tuple_impl;
251 typedef _Head_base<_Idx, _Head> _Base;
253 static constexpr _Head&
254 _M_head(
_Tuple_impl& __t) noexcept {
return _Base::_M_head(__t); }
256 static constexpr
const _Head&
257 _M_head(
const _Tuple_impl& __t) noexcept {
return _Base::_M_head(__t); }
263 _M_tail(
const _Tuple_impl& __t) noexcept {
return __t; }
269 _Tuple_impl(
const _Head& __head,
const _Tail&... __tail)
273 template<
typename _UHead,
typename... _UTail,
274 typename = __enable_if_t<
sizeof...(_Tail) ==
sizeof...(_UTail)>>
277 :
_Inherited(std::forward<_UTail>(__tail)...),
278 _Base(std::forward<_UHead>(__head))
292 _Base(std::forward<_Head>(_M_head(__in)))
295 template<
typename... _UElements>
302 template<
typename _UHead,
typename... _UTails>
307 _Base(std::forward<_UHead>
311 template<
typename _Alloc>
315 _Base(__tag, __use_alloc<_Head>(__a))
318 template<
typename _Alloc>
320 const _Head& __head,
const _Tail&... __tail)
322 _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head)
325 template<
typename _Alloc,
typename _UHead,
typename... _UTail,
326 typename = __enable_if_t<
sizeof...(_Tail) ==
sizeof...(_UTail)>>
329 _UHead&& __head, _UTail&&... __tail)
330 :
_Inherited(__tag, __a, std::forward<_UTail>(__tail)...),
331 _Base(__use_alloc<_Head, _Alloc, _UHead>(__a),
332 std::forward<_UHead>(__head))
335 template<
typename _Alloc>
340 _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in))
343 template<
typename _Alloc>
348 _Base(__use_alloc<_Head, _Alloc, _Head>(__a),
349 std::forward<_Head>(_M_head(__in)))
352 template<
typename _Alloc,
typename _UHead,
typename... _UTails>
358 _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a),
362 template<
typename _Alloc,
typename _UHead,
typename... _UTails>
368 _Base(__use_alloc<_Head, _Alloc, _UHead>(__a),
373 template<
typename... _UElements>
379 _M_tail(*this)._M_assign(
383 template<
typename _UHead,
typename... _UTails>
388 _M_head(*
this) = std::forward<_UHead>
390 _M_tail(*this)._M_assign(
400 swap(_M_head(*
this), _M_head(__in));
401 _Inherited::_M_swap(_M_tail(__in));
406 template<
size_t _Idx,
typename _Head>
408 :
private _Head_base<_Idx, _Head>
410 template<size_t,
typename...>
friend struct _Tuple_impl;
412 typedef _Head_base<_Idx, _Head> _Base;
414 static constexpr _Head&
415 _M_head(
_Tuple_impl& __t) noexcept {
return _Base::_M_head(__t); }
417 static constexpr
const _Head&
418 _M_head(
const _Tuple_impl& __t) noexcept {
return _Base::_M_head(__t); }
425 _Tuple_impl(
const _Head& __head)
429 template<
typename _UHead>
431 _Tuple_impl(_UHead&& __head)
435 constexpr _Tuple_impl(
const _Tuple_impl&) =
default;
439 _Tuple_impl& operator=(
const _Tuple_impl&) =
delete;
442 _Tuple_impl(_Tuple_impl&& __in)
443 noexcept(is_nothrow_move_constructible<_Head>::value)
447 template<
typename _UHead>
449 _Tuple_impl(
const _Tuple_impl<_Idx, _UHead>& __in)
450 : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in))
453 template<
typename _UHead>
455 _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in)
456 : _Base(
std::
forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)))
459 template<
typename _Alloc>
461 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a)
462 : _Base(__tag, __use_alloc<_Head>(__a))
465 template<
typename _Alloc>
466 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a,
468 : _Base(__use_alloc<_Head, _Alloc, const _Head&>(__a), __head)
471 template<
typename _Alloc,
typename _UHead>
473 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a,
475 : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a),
479 template<
typename _Alloc>
481 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a,
482 const _Tuple_impl& __in)
483 : _Base(__use_alloc<_Head, _Alloc, const _Head&>(__a), _M_head(__in))
486 template<
typename _Alloc>
488 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a,
490 : _Base(__use_alloc<_Head, _Alloc, _Head>(__a),
494 template<
typename _Alloc,
typename _UHead>
496 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a,
497 const _Tuple_impl<_Idx, _UHead>& __in)
498 : _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a),
499 _Tuple_impl<_Idx, _UHead>::_M_head(__in))
502 template<
typename _Alloc,
typename _UHead>
504 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a,
505 _Tuple_impl<_Idx, _UHead>&& __in)
506 : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a),
507 std::
forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)))
510 template<
typename _UHead>
513 _M_assign(
const _Tuple_impl<_Idx, _UHead>& __in)
515 _M_head(*
this) = _Tuple_impl<_Idx, _UHead>::_M_head(__in);
518 template<
typename _UHead>
521 _M_assign(_Tuple_impl<_Idx, _UHead>&& __in)
524 = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in));
530 _M_swap(_Tuple_impl& __in)
533 swap(_M_head(*
this), _M_head(__in));
539 template<bool,
typename... _Types>
540 struct _TupleConstraints
542 template<
typename _Tp,
typename _Up>
543 using is_constructible
544 = __bool_constant<__is_constructible(_Tp, _Up)>;
549 template<
typename... _UTypes>
550 static constexpr
bool __is_implicitly_constructible()
552 return __and_<is_constructible<_Types, _UTypes>...,
553 is_convertible<_UTypes, _Types>...
560 template<
typename... _UTypes>
561 static constexpr
bool __is_explicitly_constructible()
563 return __and_<is_constructible<_Types, _UTypes>...,
564 __not_<__and_<is_convertible<_UTypes, _Types>...>>
568 static constexpr
bool __is_implicitly_default_constructible()
570 return __and_<std::__is_implicitly_default_constructible<_Types>...
574 static constexpr
bool __is_explicitly_default_constructible()
576 return __and_<is_default_constructible<_Types>...,
578 std::__is_implicitly_default_constructible<_Types>...>
585 template<
typename... _Types>
586 struct _TupleConstraints<false, _Types...>
588 template<
typename... _UTypes>
589 static constexpr
bool __is_implicitly_constructible()
592 template<
typename... _UTypes>
593 static constexpr
bool __is_explicitly_constructible()
598 template<
typename... _Elements>
604 using _TCC = _TupleConstraints<_Cond, _Elements...>;
607 template<
bool _Dummy>
608 using _ImplicitDefaultCtor = __enable_if_t<
609 _TCC<_Dummy>::__is_implicitly_default_constructible(),
613 template<
bool _Dummy>
614 using _ExplicitDefaultCtor = __enable_if_t<
615 _TCC<_Dummy>::__is_explicitly_default_constructible(),
619 template<
bool _Cond,
typename... _Args>
620 using _ImplicitCtor = __enable_if_t<
621 _TCC<_Cond>::template __is_implicitly_constructible<_Args...>(),
625 template<
bool _Cond,
typename... _Args>
626 using _ExplicitCtor = __enable_if_t<
627 _TCC<_Cond>::template __is_explicitly_constructible<_Args...>(),
630 template<
typename... _UElements>
632 __enable_if_t<
sizeof...(_UElements) ==
sizeof...(_Elements),
bool>
634 {
return __and_<is_assignable<_Elements&, _UElements>...>::value; }
637 template<
typename... _UElements>
638 static constexpr
bool __nothrow_assignable()
641 __and_<is_nothrow_assignable<_Elements&, _UElements>...>::value;
645 template<
typename... _UElements>
646 static constexpr
bool __nothrow_constructible()
649 __and_<is_nothrow_constructible<_Elements, _UElements>...>::value;
653 template<
typename _Up>
654 static constexpr
bool __valid_args()
656 return sizeof...(_Elements) == 1
661 template<
typename,
typename,
typename... _Tail>
662 static constexpr
bool __valid_args()
663 {
return (
sizeof...(_Tail) + 2) ==
sizeof...(_Elements); }
674 template<
typename _Tuple,
typename =
tuple,
675 typename = __remove_cvref_t<_Tuple>>
681 template<
typename _Tuple,
typename _Tp,
typename _Up>
682 struct _UseOtherCtor<_Tuple,
tuple<_Tp>,
tuple<_Up>>
683 : __or_<is_convertible<_Tuple, _Tp>, is_constructible<_Tp, _Tuple>>
687 template<
typename _Tuple,
typename _Tp>
688 struct _UseOtherCtor<_Tuple,
tuple<_Tp>,
tuple<_Tp>>
695 template<
typename _Tuple>
696 static constexpr
bool __use_other_ctor()
697 {
return _UseOtherCtor<_Tuple>::value; }
700 template<
typename _Dummy = void,
701 _ImplicitDefaultCtor<is_void<_Dummy>::value> =
true>
707 template<
typename _Dummy = void,
708 _ExplicitDefaultCtor<is_void<_Dummy>::value> =
false>
714 template<
bool _NotEmpty = (
sizeof...(_Elements) >= 1),
715 _ImplicitCtor<_NotEmpty,
const _Elements&...> =
true>
717 tuple(
const _Elements&... __elements)
718 noexcept(__nothrow_constructible<const _Elements&...>())
721 template<
bool _NotEmpty = (
sizeof...(_Elements) >= 1),
722 _ExplicitCtor<_NotEmpty,
const _Elements&...> =
false>
724 tuple(
const _Elements&... __elements)
725 noexcept(__nothrow_constructible<const _Elements&...>())
728 template<
typename... _UElements,
729 bool _Valid = __valid_args<_UElements...>(),
730 _ImplicitCtor<_Valid, _UElements...> =
true>
732 tuple(_UElements&&... __elements)
733 noexcept(__nothrow_constructible<_UElements...>())
734 :
_Inherited(std::forward<_UElements>(__elements)...) { }
736 template<
typename... _UElements,
737 bool _Valid = __valid_args<_UElements...>(),
738 _ExplicitCtor<_Valid, _UElements...> =
false>
740 tuple(_UElements&&... __elements)
741 noexcept(__nothrow_constructible<_UElements...>())
742 :
_Inherited(std::forward<_UElements>(__elements)...) { }
748 template<
typename... _UElements,
749 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
751 _ImplicitCtor<_Valid,
const _UElements&...> =
true>
754 noexcept(__nothrow_constructible<const _UElements&...>())
758 template<
typename... _UElements,
759 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
761 _ExplicitCtor<_Valid,
const _UElements&...> =
false>
764 noexcept(__nothrow_constructible<const _UElements&...>())
768 template<
typename... _UElements,
769 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
771 _ImplicitCtor<_Valid, _UElements...> =
true>
774 noexcept(__nothrow_constructible<_UElements...>())
777 template<
typename... _UElements,
778 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
780 _ExplicitCtor<_Valid, _UElements...> =
false>
783 noexcept(__nothrow_constructible<_UElements...>())
788 template<
typename _Alloc,
789 _ImplicitDefaultCtor<is_object<_Alloc>::value> =
true>
794 template<
typename _Alloc,
bool _NotEmpty = (
sizeof...(_Elements) >= 1),
795 _ImplicitCtor<_NotEmpty,
const _Elements&...> =
true>
798 const _Elements&... __elements)
801 template<
typename _Alloc,
bool _NotEmpty = (
sizeof...(_Elements) >= 1),
802 _ExplicitCtor<_NotEmpty,
const _Elements&...> =
false>
806 const _Elements&... __elements)
809 template<
typename _Alloc,
typename... _UElements,
810 bool _Valid = __valid_args<_UElements...>(),
811 _ImplicitCtor<_Valid, _UElements...> =
true>
814 _UElements&&... __elements)
815 :
_Inherited(__tag, __a, std::forward<_UElements>(__elements)...)
818 template<
typename _Alloc,
typename... _UElements,
819 bool _Valid = __valid_args<_UElements...>(),
820 _ExplicitCtor<_Valid, _UElements...> =
false>
824 _UElements&&... __elements)
825 :
_Inherited(__tag, __a, std::forward<_UElements>(__elements)...)
828 template<
typename _Alloc>
833 template<
typename _Alloc>
838 template<
typename _Alloc,
typename... _UElements,
839 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
841 _ImplicitCtor<_Valid,
const _UElements&...> =
true>
846 static_cast<const _Tuple_impl<0, _UElements...
>&>(__in))
849 template<
typename _Alloc,
typename... _UElements,
850 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
852 _ExplicitCtor<_Valid,
const _UElements&...> =
false>
858 static_cast<const _Tuple_impl<0, _UElements...
>&>(__in))
861 template<
typename _Alloc,
typename... _UElements,
862 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
864 _ImplicitCtor<_Valid, _UElements...> =
true>
869 static_cast<_Tuple_impl<0, _UElements...
>&&>(__in))
872 template<
typename _Alloc,
typename... _UElements,
873 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
875 _ExplicitCtor<_Valid, _UElements...> =
false>
881 static_cast<_Tuple_impl<0, _UElements...
>&&>(__in))
888 operator=(
typename conditional<__assignable<const _Elements&...>(),
890 const __nonesuch&>::type __in)
891 noexcept(__nothrow_assignable<const _Elements&...>())
893 this->_M_assign(__in);
899 operator=(
typename conditional<__assignable<_Elements...>(),
901 __nonesuch&&>::type __in)
902 noexcept(__nothrow_assignable<_Elements...>())
908 template<
typename... _UElements>
910 __enable_if_t<__assignable<
const _UElements&...>(),
tuple&>
912 noexcept(__nothrow_assignable<const _UElements&...>())
914 this->_M_assign(__in);
918 template<
typename... _UElements>
920 __enable_if_t<__assignable<_UElements...>(),
tuple&>
922 noexcept(__nothrow_assignable<_UElements...>())
932 noexcept(__and_<__is_nothrow_swappable<_Elements>...>::value)
933 { _Inherited::_M_swap(__in); }
936 #if __cpp_deduction_guides >= 201606
937 template<
typename... _UTypes>
939 template<
typename _T1,
typename _T2>
941 template<
typename _Alloc,
typename... _UTypes>
943 template<
typename _Alloc,
typename _T1,
typename _T2>
945 template<
typename _Alloc,
typename... _UTypes>
954 void swap(
tuple&) noexcept { }
959 template<
typename _Alloc>
961 tuple(allocator_arg_t,
const _Alloc&) noexcept { }
962 template<
typename _Alloc>
964 tuple(allocator_arg_t,
const _Alloc&,
const tuple&) noexcept { }
969 template<
typename _T1,
typename _T2>
975 template<
bool _Dummy,
typename _U1,
typename _U2>
976 using _ImplicitDefaultCtor = __enable_if_t<
977 _TupleConstraints<_Dummy, _U1, _U2>::
978 __is_implicitly_default_constructible(),
982 template<
bool _Dummy,
typename _U1,
typename _U2>
983 using _ExplicitDefaultCtor = __enable_if_t<
984 _TupleConstraints<_Dummy, _U1, _U2>::
985 __is_explicitly_default_constructible(),
988 template<
bool _Dummy>
989 using _TCC = _TupleConstraints<_Dummy, _T1, _T2>;
992 template<
bool _Cond,
typename _U1,
typename _U2>
993 using _ImplicitCtor = __enable_if_t<
994 _TCC<_Cond>::template __is_implicitly_constructible<_U1, _U2>(),
998 template<
bool _Cond,
typename _U1,
typename _U2>
999 using _ExplicitCtor = __enable_if_t<
1000 _TCC<_Cond>::template __is_explicitly_constructible<_U1, _U2>(),
1003 template<
typename _U1,
typename _U2>
1004 static constexpr
bool __assignable()
1006 return __and_<is_assignable<_T1&, _U1>,
1010 template<
typename _U1,
typename _U2>
1011 static constexpr
bool __nothrow_assignable()
1013 return __and_<is_nothrow_assignable<_T1&, _U1>,
1017 template<
typename _U1,
typename _U2>
1018 static constexpr
bool __nothrow_constructible()
1020 return __and_<is_nothrow_constructible<_T1, _U1>,
1024 static constexpr
bool __nothrow_default_constructible()
1026 return __and_<is_nothrow_default_constructible<_T1>,
1030 template<
typename _U1>
1031 static constexpr
bool __is_alloc_arg()
1035 template<
bool _Dummy =
true,
1036 _ImplicitDefaultCtor<_Dummy, _T1, _T2> =
true>
1039 noexcept(__nothrow_default_constructible())
1042 template<
bool _Dummy =
true,
1043 _ExplicitDefaultCtor<_Dummy, _T1, _T2> =
false>
1046 noexcept(__nothrow_default_constructible())
1049 template<
bool _Dummy =
true,
1050 _ImplicitCtor<_Dummy, const _T1&, const _T2&> =
true>
1052 tuple(
const _T1& __a1,
const _T2& __a2)
1053 noexcept(__nothrow_constructible<const _T1&, const _T2&>())
1056 template<
bool _Dummy =
true,
1057 _ExplicitCtor<_Dummy, const _T1&, const _T2&> =
false>
1059 tuple(
const _T1& __a1,
const _T2& __a2)
1060 noexcept(__nothrow_constructible<const _T1&, const _T2&>())
1063 template<
typename _U1,
typename _U2,
1064 _ImplicitCtor<!__is_alloc_arg<_U1>(), _U1, _U2> =
true>
1066 tuple(_U1&& __a1, _U2&& __a2)
1067 noexcept(__nothrow_constructible<_U1, _U2>())
1068 :
_Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { }
1070 template<
typename _U1,
typename _U2,
1071 _ExplicitCtor<!__is_alloc_arg<_U1>(), _U1, _U2> =
false>
1073 tuple(_U1&& __a1, _U2&& __a2)
1074 noexcept(__nothrow_constructible<_U1, _U2>())
1075 :
_Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { }
1081 template<
typename _U1,
typename _U2,
1082 _ImplicitCtor<true, const _U1&, const _U2&> =
true>
1085 noexcept(__nothrow_constructible<const _U1&, const _U2&>())
1088 template<
typename _U1,
typename _U2,
1089 _ExplicitCtor<true, const _U1&, const _U2&> =
false>
1092 noexcept(__nothrow_constructible<const _U1&, const _U2&>())
1095 template<
typename _U1,
typename _U2,
1096 _ImplicitCtor<true, _U1, _U2> =
true>
1099 noexcept(__nothrow_constructible<_U1, _U2>())
1102 template<
typename _U1,
typename _U2,
1103 _ExplicitCtor<true, _U1, _U2> =
false>
1106 noexcept(__nothrow_constructible<_U1, _U2>())
1109 template<
typename _U1,
typename _U2,
1110 _ImplicitCtor<true, const _U1&, const _U2&> =
true>
1113 noexcept(__nothrow_constructible<const _U1&, const _U2&>())
1116 template<
typename _U1,
typename _U2,
1117 _ExplicitCtor<true, const _U1&, const _U2&> =
false>
1120 noexcept(__nothrow_constructible<const _U1&, const _U2&>())
1123 template<
typename _U1,
typename _U2,
1124 _ImplicitCtor<true, _U1, _U2> =
true>
1127 noexcept(__nothrow_constructible<_U1, _U2>())
1129 std::forward<_U2>(__in.second)) { }
1131 template<
typename _U1,
typename _U2,
1132 _ExplicitCtor<true, _U1, _U2> =
false>
1135 noexcept(__nothrow_constructible<_U1, _U2>())
1137 std::forward<_U2>(__in.second)) { }
1141 template<
typename _Alloc,
1142 _ImplicitDefaultCtor<is_object<_Alloc>::value, _T1, _T2> =
true>
1143 _GLIBCXX20_CONSTEXPR
1147 template<
typename _Alloc,
bool _Dummy =
true,
1148 _ImplicitCtor<_Dummy, const _T1&, const _T2&> =
true>
1149 _GLIBCXX20_CONSTEXPR
1151 const _T1& __a1,
const _T2& __a2)
1154 template<
typename _Alloc,
bool _Dummy =
true,
1155 _ExplicitCtor<_Dummy, const _T1&, const _T2&> =
false>
1157 _GLIBCXX20_CONSTEXPR
1159 const _T1& __a1,
const _T2& __a2)
1162 template<
typename _Alloc,
typename _U1,
typename _U2,
1163 _ImplicitCtor<true, _U1, _U2> =
true>
1164 _GLIBCXX20_CONSTEXPR
1166 :
_Inherited(__tag, __a, std::forward<_U1>(__a1),
1167 std::forward<_U2>(__a2)) { }
1169 template<
typename _Alloc,
typename _U1,
typename _U2,
1170 _ExplicitCtor<true, _U1, _U2> =
false>
1172 _GLIBCXX20_CONSTEXPR
1174 _U1&& __a1, _U2&& __a2)
1175 :
_Inherited(__tag, __a, std::forward<_U1>(__a1),
1176 std::forward<_U2>(__a2)) { }
1178 template<
typename _Alloc>
1179 _GLIBCXX20_CONSTEXPR
1183 template<
typename _Alloc>
1184 _GLIBCXX20_CONSTEXPR
1188 template<
typename _Alloc,
typename _U1,
typename _U2,
1189 _ImplicitCtor<true, const _U1&, const _U2&> =
true>
1190 _GLIBCXX20_CONSTEXPR
1197 template<
typename _Alloc,
typename _U1,
typename _U2,
1198 _ExplicitCtor<true, const _U1&, const _U2&> =
false>
1200 _GLIBCXX20_CONSTEXPR
1207 template<
typename _Alloc,
typename _U1,
typename _U2,
1208 _ImplicitCtor<true, _U1, _U2> =
true>
1209 _GLIBCXX20_CONSTEXPR
1214 template<
typename _Alloc,
typename _U1,
typename _U2,
1215 _ExplicitCtor<true, _U1, _U2> =
false>
1217 _GLIBCXX20_CONSTEXPR
1222 template<
typename _Alloc,
typename _U1,
typename _U2,
1223 _ImplicitCtor<true, const _U1&, const _U2&> =
true>
1224 _GLIBCXX20_CONSTEXPR
1227 :
_Inherited(__tag, __a, __in.first, __in.second) { }
1229 template<
typename _Alloc,
typename _U1,
typename _U2,
1230 _ExplicitCtor<true, const _U1&, const _U2&> =
false>
1232 _GLIBCXX20_CONSTEXPR
1235 :
_Inherited(__tag, __a, __in.first, __in.second) { }
1237 template<
typename _Alloc,
typename _U1,
typename _U2,
1238 _ImplicitCtor<true, _U1, _U2> =
true>
1239 _GLIBCXX20_CONSTEXPR
1241 :
_Inherited(__tag, __a, std::forward<_U1>(__in.first),
1242 std::forward<_U2>(__in.second)) { }
1244 template<
typename _Alloc,
typename _U1,
typename _U2,
1245 _ExplicitCtor<true, _U1, _U2> =
false>
1247 _GLIBCXX20_CONSTEXPR
1249 :
_Inherited(__tag, __a, std::forward<_U1>(__in.first),
1250 std::forward<_U2>(__in.second)) { }
1254 _GLIBCXX20_CONSTEXPR
1256 operator=(
typename conditional<__assignable<const _T1&, const _T2&>(),
1258 const __nonesuch&>::type __in)
1259 noexcept(__nothrow_assignable<const _T1&, const _T2&>())
1261 this->_M_assign(__in);
1265 _GLIBCXX20_CONSTEXPR
1267 operator=(
typename conditional<__assignable<_T1, _T2>(),
1269 __nonesuch&&>::type __in)
1270 noexcept(__nothrow_assignable<_T1, _T2>())
1276 template<
typename _U1,
typename _U2>
1277 _GLIBCXX20_CONSTEXPR
1278 __enable_if_t<__assignable<const _U1&, const _U2&>(),
tuple&>
1280 noexcept(__nothrow_assignable<const _U1&, const _U2&>())
1282 this->_M_assign(__in);
1286 template<
typename _U1,
typename _U2>
1287 _GLIBCXX20_CONSTEXPR
1288 __enable_if_t<__assignable<_U1, _U2>(),
tuple&>
1290 noexcept(__nothrow_assignable<_U1, _U2>())
1296 template<
typename _U1,
typename _U2>
1297 _GLIBCXX20_CONSTEXPR
1298 __enable_if_t<__assignable<const _U1&, const _U2&>(),
tuple&>
1300 noexcept(__nothrow_assignable<const _U1&, const _U2&>())
1302 this->_M_head(*
this) = __in.first;
1303 this->_M_tail(*this)._M_head(*
this) = __in.second;
1307 template<
typename _U1,
typename _U2>
1308 _GLIBCXX20_CONSTEXPR
1309 __enable_if_t<__assignable<_U1, _U2>(),
tuple&>
1311 noexcept(__nothrow_assignable<_U1, _U2>())
1313 this->_M_head(*
this) = std::forward<_U1>(__in.first);
1314 this->_M_tail(*this)._M_head(*
this) = std::forward<_U2>(__in.second);
1318 _GLIBCXX20_CONSTEXPR
1321 noexcept(__and_<__is_nothrow_swappable<_T1>,
1322 __is_nothrow_swappable<_T2>>::value)
1323 { _Inherited::_M_swap(__in); }
1328 template<
typename... _Elements>
1332 #if __cplusplus > 201402L
1333 template <
typename _Tp>
1341 template<
size_t __i,
typename _Head,
typename... _Tail>
1348 template<
typename _Head,
typename... _Tail>
1357 template<
size_t __i>
1361 "tuple index is in range");
1364 template<
size_t __i,
typename _Head,
typename... _Tail>
1369 template<
size_t __i,
typename _Head,
typename... _Tail>
1370 constexpr
const _Head&
1371 __get_helper(
const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
1372 {
return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); }
1375 template<
size_t __i,
typename... _Elements>
1376 constexpr __tuple_element_t<__i, tuple<_Elements...>>&
1378 {
return std::__get_helper<__i>(__t); }
1381 template<
size_t __i,
typename... _Elements>
1382 constexpr
const __tuple_element_t<__i, tuple<_Elements...>>&
1384 {
return std::__get_helper<__i>(__t); }
1387 template<
size_t __i,
typename... _Elements>
1388 constexpr __tuple_element_t<__i, tuple<_Elements...>>&&
1391 typedef __tuple_element_t<__i,
tuple<_Elements...>> __element_type;
1392 return std::forward<__element_type&&>(std::get<__i>(__t));
1396 template<
size_t __i,
typename... _Elements>
1397 constexpr
const __tuple_element_t<__i, tuple<_Elements...>>&&
1400 typedef __tuple_element_t<__i,
tuple<_Elements...>> __element_type;
1401 return std::forward<const __element_type&&>(std::get<__i>(__t));
1404 #if __cplusplus >= 201402L
1406 #define __cpp_lib_tuples_by_type 201304
1408 template<
typename _Head,
size_t __i,
typename... _Tail>
1410 __get_helper2(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
1411 {
return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); }
1413 template<
typename _Head,
size_t __i,
typename... _Tail>
1414 constexpr
const _Head&
1415 __get_helper2(
const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
1416 {
return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); }
1419 template <
typename _Tp,
typename... _Types>
1422 {
return std::__get_helper2<_Tp>(__t); }
1425 template <
typename _Tp,
typename... _Types>
1428 {
return std::forward<_Tp&&>(std::__get_helper2<_Tp>(__t)); }
1431 template <
typename _Tp,
typename... _Types>
1432 constexpr
const _Tp&
1434 {
return std::__get_helper2<_Tp>(__t); }
1438 template <
typename _Tp,
typename... _Types>
1439 constexpr
const _Tp&&
1441 {
return std::forward<const _Tp&&>(std::__get_helper2<_Tp>(__t)); }
1445 template<
typename _Tp,
typename _Up,
size_t __i,
size_t __size>
1446 struct __tuple_compare
1448 static constexpr
bool
1449 __eq(
const _Tp& __t,
const _Up& __u)
1451 return bool(std::get<__i>(__t) == std::get<__i>(__u))
1452 && __tuple_compare<_Tp, _Up, __i + 1, __size>::__eq(__t, __u);
1455 static constexpr
bool
1456 __less(
const _Tp& __t,
const _Up& __u)
1458 return bool(std::get<__i>(__t) < std::get<__i>(__u))
1459 || (!bool(std::get<__i>(__u) < std::get<__i>(__t))
1460 && __tuple_compare<_Tp, _Up, __i + 1, __size>::__less(__t, __u));
1464 template<
typename _Tp,
typename _Up,
size_t __size>
1465 struct __tuple_compare<_Tp, _Up, __size, __size>
1467 static constexpr
bool
1468 __eq(
const _Tp&,
const _Up&) {
return true; }
1470 static constexpr
bool
1471 __less(
const _Tp&,
const _Up&) {
return false; }
1474 template<
typename... _TElements,
typename... _UElements>
1476 operator==(
const tuple<_TElements...>& __t,
1477 const tuple<_UElements...>& __u)
1479 static_assert(
sizeof...(_TElements) ==
sizeof...(_UElements),
1480 "tuple objects can only be compared if they have equal sizes.");
1481 using __compare = __tuple_compare<tuple<_TElements...>,
1482 tuple<_UElements...>,
1483 0,
sizeof...(_TElements)>;
1484 return __compare::__eq(__t, __u);
1487 #if __cpp_lib_three_way_comparison
1488 template<
typename _Cat,
typename _Tp,
typename _Up>
1490 __tuple_cmp(
const _Tp&,
const _Up&, index_sequence<>)
1491 {
return _Cat::equivalent; }
1493 template<
typename _Cat,
typename _Tp,
typename _Up,
1494 size_t _Idx0,
size_t... _Idxs>
1496 __tuple_cmp(
const _Tp& __t,
const _Up& __u,
1497 index_sequence<_Idx0, _Idxs...>)
1500 = __detail::__synth3way(std::get<_Idx0>(__t), std::get<_Idx0>(__u));
1503 return std::__tuple_cmp<_Cat>(__t, __u, index_sequence<_Idxs...>());
1506 template<
typename... _Tps,
typename... _Ups>
1508 common_comparison_category_t<__detail::__synth3way_t<_Tps, _Ups>...>
1509 operator<=>(
const tuple<_Tps...>& __t,
const tuple<_Ups...>& __u)
1512 = common_comparison_category_t<__detail::__synth3way_t<_Tps, _Ups>...>;
1513 return std::__tuple_cmp<_Cat>(__t, __u, index_sequence_for<_Tps...>());
1516 template<
typename... _TElements,
typename... _UElements>
1518 operator<(
const tuple<_TElements...>& __t,
1519 const tuple<_UElements...>& __u)
1521 static_assert(
sizeof...(_TElements) ==
sizeof...(_UElements),
1522 "tuple objects can only be compared if they have equal sizes.");
1523 using __compare = __tuple_compare<tuple<_TElements...>,
1524 tuple<_UElements...>,
1525 0,
sizeof...(_TElements)>;
1526 return __compare::__less(__t, __u);
1529 template<
typename... _TElements,
typename... _UElements>
1531 operator!=(
const tuple<_TElements...>& __t,
1532 const tuple<_UElements...>& __u)
1533 {
return !(__t == __u); }
1535 template<
typename... _TElements,
typename... _UElements>
1537 operator>(
const tuple<_TElements...>& __t,
1538 const tuple<_UElements...>& __u)
1539 {
return __u < __t; }
1541 template<
typename... _TElements,
typename... _UElements>
1543 operator<=(
const tuple<_TElements...>& __t,
1544 const tuple<_UElements...>& __u)
1545 {
return !(__u < __t); }
1547 template<
typename... _TElements,
typename... _UElements>
1549 operator>=(
const tuple<_TElements...>& __t,
1550 const tuple<_UElements...>& __u)
1551 {
return !(__t < __u); }
1555 template<
typename... _Elements>
1556 constexpr tuple<typename __decay_and_strip<_Elements>::__type...>
1557 make_tuple(_Elements&&... __args)
1559 typedef tuple<typename __decay_and_strip<_Elements>::__type...>
1561 return __result_type(std::forward<_Elements>(__args)...);
1567 template<
typename... _Elements>
1568 constexpr tuple<_Elements&&...>
1570 {
return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); }
1572 template<
size_t,
typename,
typename,
size_t>
1573 struct __make_tuple_impl;
1575 template<
size_t _Idx,
typename _Tuple,
typename... _Tp,
size_t _Nm>
1576 struct __make_tuple_impl<_Idx, tuple<_Tp...>, _Tuple, _Nm>
1577 : __make_tuple_impl<_Idx + 1,
1578 tuple<_Tp..., __tuple_element_t<_Idx, _Tuple>>,
1582 template<
size_t _Nm,
typename _Tuple,
typename... _Tp>
1583 struct __make_tuple_impl<_Nm, tuple<_Tp...>, _Tuple, _Nm>
1585 typedef tuple<_Tp...> __type;
1588 template<
typename _Tuple>
1589 struct __do_make_tuple
1590 : __make_tuple_impl<0, tuple<>, _Tuple, tuple_size<_Tuple>::value>
1594 template<
typename _Tuple>
1596 :
public __do_make_tuple<__remove_cvref_t<_Tuple>>
1600 template<
typename...>
1601 struct __combine_tuples;
1604 struct __combine_tuples<>
1606 typedef tuple<> __type;
1609 template<
typename... _Ts>
1610 struct __combine_tuples<tuple<_Ts...>>
1612 typedef tuple<_Ts...> __type;
1615 template<
typename... _T1s,
typename... _T2s,
typename... _Rem>
1616 struct __combine_tuples<tuple<_T1s...>, tuple<_T2s...>, _Rem...>
1618 typedef typename __combine_tuples<tuple<_T1s..., _T2s...>,
1619 _Rem...>::__type __type;
1623 template<
typename... _Tpls>
1624 struct __tuple_cat_result
1626 typedef typename __combine_tuples
1627 <
typename __make_tuple<_Tpls>::__type...>::__type __type;
1632 template<
typename...>
1633 struct __make_1st_indices;
1636 struct __make_1st_indices<>
1638 typedef _Index_tuple<> __type;
1641 template<
typename _Tp,
typename... _Tpls>
1642 struct __make_1st_indices<_Tp, _Tpls...>
1644 typedef typename _Build_index_tuple<tuple_size<
1645 typename remove_reference<_Tp>::type>::value>::__type __type;
1651 template<
typename _Ret,
typename _Indices,
typename... _Tpls>
1652 struct __tuple_concater;
1654 template<
typename _Ret,
size_t... _Is,
typename _Tp,
typename... _Tpls>
1655 struct __tuple_concater<_Ret, _Index_tuple<_Is...>, _Tp, _Tpls...>
1657 template<
typename... _Us>
1658 static constexpr _Ret
1659 _S_do(_Tp&& __tp, _Tpls&&... __tps, _Us&&... __us)
1661 typedef typename __make_1st_indices<_Tpls...>::__type __idx;
1662 typedef __tuple_concater<_Ret, __idx, _Tpls...> __next;
1663 return __next::_S_do(std::forward<_Tpls>(__tps)...,
1664 std::forward<_Us>(__us)...,
1665 std::get<_Is>(std::forward<_Tp>(__tp))...);
1669 template<
typename _Ret>
1670 struct __tuple_concater<_Ret, _Index_tuple<>>
1672 template<
typename... _Us>
1673 static constexpr _Ret
1674 _S_do(_Us&&... __us)
1676 return _Ret(std::forward<_Us>(__us)...);
1681 template<
typename... _Tpls,
typename =
typename
1682 enable_if<__and_<__is_tuple_like<_Tpls>...>::value>::type>
1685 ->
typename __tuple_cat_result<_Tpls...>::__type
1687 typedef typename __tuple_cat_result<_Tpls...>::__type __ret;
1688 typedef typename __make_1st_indices<_Tpls...>::__type __idx;
1689 typedef __tuple_concater<__ret, __idx, _Tpls...> __concater;
1690 return __concater::_S_do(std::forward<_Tpls>(__tpls)...);
1696 template<
typename... _Elements>
1697 constexpr tuple<_Elements&...>
1698 tie(_Elements&... __args) noexcept
1699 {
return tuple<_Elements&...>(__args...); }
1702 template<
typename... _Elements>
1703 _GLIBCXX20_CONSTEXPR
1705 #if __cplusplus > 201402L || !defined(__STRICT_ANSI__)
1707 typename enable_if<__and_<__is_swappable<_Elements>...>::value
1713 noexcept(noexcept(__x.swap(__y)))
1716 #if __cplusplus > 201402L || !defined(__STRICT_ANSI__)
1717 template<
typename... _Elements>
1718 _GLIBCXX20_CONSTEXPR
1719 typename enable_if<!__and_<__is_swappable<_Elements>...>::value>::type
1720 swap(tuple<_Elements...>&, tuple<_Elements...>&) =
delete;
1727 struct _Swallow_assign
1730 _GLIBCXX14_CONSTEXPR
const _Swallow_assign&
1731 operator=(
const _Tp&)
const
1737 _GLIBCXX17_INLINE constexpr _Swallow_assign ignore{};
1740 template<
typename... _Types,
typename _Alloc>
1752 template<
class _T1,
class _T2>
1753 template<
typename... _Args1,
typename... _Args2>
1754 _GLIBCXX20_CONSTEXPR
1759 :
pair(__first, __second,
1760 typename _Build_index_tuple<sizeof...(_Args1)>::__type(),
1761 typename _Build_index_tuple<sizeof...(_Args2)>::__type())
1764 template<
class _T1,
class _T2>
1765 template<
typename... _Args1,
size_t... _Indexes1,
1766 typename... _Args2,
size_t... _Indexes2>
1767 _GLIBCXX20_CONSTEXPR
inline
1770 _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>)
1771 : first(
std::
forward<_Args1>(
std::get<_Indexes1>(__tuple1))...),
1772 second(
std::
forward<_Args2>(
std::get<_Indexes2>(__tuple2))...)
1775 #if __cplusplus >= 201703L
1781 template<
template<
typename...>
class _Trait,
typename _Tp,
typename _Tuple>
1782 inline constexpr
bool __unpack_std_tuple =
false;
1784 template<
template<
typename...>
class _Trait,
typename _Tp,
typename... _Up>
1785 inline constexpr
bool __unpack_std_tuple<_Trait, _Tp, tuple<_Up...>>
1786 = _Trait<_Tp, _Up...>::value;
1788 template<
template<
typename...>
class _Trait,
typename _Tp,
typename... _Up>
1789 inline constexpr
bool __unpack_std_tuple<_Trait, _Tp, tuple<_Up...>&>
1790 = _Trait<_Tp, _Up&...>::value;
1792 template<
template<
typename...>
class _Trait,
typename _Tp,
typename... _Up>
1793 inline constexpr
bool __unpack_std_tuple<_Trait, _Tp,
const tuple<_Up...>>
1794 = _Trait<_Tp,
const _Up...>::value;
1796 template<
template<
typename...>
class _Trait,
typename _Tp,
typename... _Up>
1797 inline constexpr
bool __unpack_std_tuple<_Trait, _Tp,
const tuple<_Up...>&>
1798 = _Trait<_Tp,
const _Up&...>::value;
1800 # define __cpp_lib_apply 201603
1802 template <
typename _Fn,
typename _Tuple,
size_t... _Idx>
1803 constexpr decltype(
auto)
1807 std::get<_Idx>(std::forward<_Tuple>(__t))...);
1810 template <
typename _Fn,
typename _Tuple>
1811 constexpr decltype(
auto)
1812 apply(_Fn&& __f, _Tuple&& __t)
1813 noexcept(__unpack_std_tuple<is_nothrow_invocable, _Fn, _Tuple>)
1816 = make_index_sequence<tuple_size_v<remove_reference_t<_Tuple>>>;
1817 return std::__apply_impl(std::forward<_Fn>(__f),
1818 std::forward<_Tuple>(__t),
1822 #define __cpp_lib_make_from_tuple 201606
1824 template <
typename _Tp,
typename _Tuple,
size_t... _Idx>
1826 __make_from_tuple_impl(_Tuple&& __t, index_sequence<_Idx...>)
1827 {
return _Tp(std::get<_Idx>(std::forward<_Tuple>(__t))...); }
1829 template <
typename _Tp,
typename _Tuple>
1831 make_from_tuple(_Tuple&& __t)
1832 noexcept(__unpack_std_tuple<is_nothrow_constructible, _Tp, _Tuple>)
1834 return __make_from_tuple_impl<_Tp>(
1835 std::forward<_Tuple>(__t),
1842 _GLIBCXX_END_NAMESPACE_VERSION
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
constexpr auto tuple_cat(_Tpls &&... __tpls) -> typename __tuple_cat_result< _Tpls... >::__type
tuple_cat
constexpr tuple< _Elements &... > tie(_Elements &... __args) noexcept
tie
constexpr __invoke_result< _Callable, _Args... >::type __invoke(_Callable &&__fn, _Args &&... __args) noexcept(__is_nothrow_invocable< _Callable, _Args... >::value)
Invoke a callable object.
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
constexpr tuple< _Elements &&... > forward_as_tuple(_Elements &&... __args) noexcept
std::forward_as_tuple
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
ISO C++ entities toplevel namespace is std.
make_integer_sequence< size_t, _Num > make_index_sequence
Alias template make_index_sequence.
integer_sequence< size_t, _Idx... > index_sequence
Alias template index_sequence.
Primary class template, tuple.
Partial specialization, 2-element tuple. Includes construction and assignment from a pair.
Define a member typedef type to one of two argument types.
is_nothrow_default_constructible
is_nothrow_move_constructible
Declare uses_allocator so it can be specialized in <queue> etc.
Tag type for piecewise construction of std::pair objects.
Struct holding two objects of arbitrary type.