29 #ifndef _GLIBCXX_TUPLE
30 #define _GLIBCXX_TUPLE 1
32 #pragma GCC system_header
34 #if __cplusplus < 201103L
40 #include <bits/uses_allocator.h>
43 namespace std _GLIBCXX_VISIBILITY(default)
45 _GLIBCXX_BEGIN_NAMESPACE_VERSION
52 template<
typename... _Elements>
55 template<
typename _Tp>
56 struct __is_empty_non_tuple :
is_empty<_Tp> { };
59 template<
typename _El0,
typename... _El>
63 template<
typename _Tp>
64 using __empty_not_final
65 =
typename conditional<__is_final(_Tp),
false_type,
66 __is_empty_non_tuple<_Tp>>::type;
68 template<std::size_t _Idx,
typename _Head,
69 bool = __empty_not_final<_Head>::value>
72 template<std::
size_t _Idx,
typename _Head>
73 struct _Head_base<_Idx, _Head, true>
76 constexpr _Head_base()
79 constexpr _Head_base(
const _Head& __h)
82 constexpr _Head_base(
const _Head_base&) =
default;
83 constexpr _Head_base(_Head_base&&) =
default;
85 template<
typename _UHead>
86 constexpr _Head_base(_UHead&& __h)
89 _Head_base(allocator_arg_t, __uses_alloc0)
92 template<
typename _Alloc>
93 _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a)
94 : _Head(allocator_arg, *__a._M_a) { }
96 template<
typename _Alloc>
97 _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a)
98 : _Head(*__a._M_a) { }
100 template<
typename _UHead>
101 _Head_base(__uses_alloc0, _UHead&& __uhead)
104 template<
typename _Alloc,
typename _UHead>
105 _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead)
106 : _Head(allocator_arg, *__a._M_a,
std::
forward<_UHead>(__uhead)) { }
108 template<
typename _Alloc,
typename _UHead>
109 _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead)
110 : _Head(
std::
forward<_UHead>(__uhead), *__a._M_a) { }
112 static constexpr _Head&
113 _M_head(_Head_base& __b) noexcept {
return __b; }
115 static constexpr
const _Head&
116 _M_head(
const _Head_base& __b) noexcept {
return __b; }
119 template<std::
size_t _Idx,
typename _Head>
120 struct _Head_base<_Idx, _Head, false>
122 constexpr _Head_base()
125 constexpr _Head_base(
const _Head& __h)
126 : _M_head_impl(__h) { }
128 constexpr _Head_base(
const _Head_base&) =
default;
129 constexpr _Head_base(_Head_base&&) =
default;
131 template<
typename _UHead>
132 constexpr _Head_base(_UHead&& __h)
136 _Head_base(allocator_arg_t, __uses_alloc0)
139 template<
typename _Alloc>
140 _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a)
141 : _M_head_impl(allocator_arg, *__a._M_a) { }
143 template<
typename _Alloc>
144 _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a)
145 : _M_head_impl(*__a._M_a) { }
147 template<
typename _UHead>
149 _Head_base(__uses_alloc0, _UHead&& __uhead)
150 : _M_head_impl(
std::
forward<_UHead>(__uhead)) { }
152 template<
typename _Alloc,
typename _UHead>
153 _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead)
154 : _M_head_impl(allocator_arg, *__a._M_a,
std::
forward<_UHead>(__uhead))
157 template<
typename _Alloc,
typename _UHead>
158 _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead)
159 : _M_head_impl(
std::
forward<_UHead>(__uhead), *__a._M_a) { }
161 static constexpr _Head&
162 _M_head(_Head_base& __b) noexcept {
return __b._M_head_impl; }
164 static constexpr
const _Head&
165 _M_head(
const _Head_base& __b) noexcept {
return __b._M_head_impl; }
178 template<std::size_t _Idx,
typename... _Elements>
186 template<std::size_t _Idx,
typename _Head,
typename... _Tail>
189 private _Head_base<_Idx, _Head>
191 template<std::size_t,
typename...>
friend class _Tuple_impl;
194 typedef _Head_base<_Idx, _Head> _Base;
196 static constexpr _Head&
197 _M_head(
_Tuple_impl& __t) noexcept {
return _Base::_M_head(__t); }
199 static constexpr
const _Head&
200 _M_head(
const _Tuple_impl& __t) noexcept {
return _Base::_M_head(__t); }
206 _M_tail(
const _Tuple_impl& __t) noexcept {
return __t; }
212 constexpr
_Tuple_impl(
const _Head& __head,
const _Tail&... __tail)
215 template<
typename _UHead,
typename... _UTail,
typename =
typename
216 enable_if<
sizeof...(_Tail) ==
sizeof...(_UTail)>::type>
218 constexpr
_Tuple_impl(_UHead&& __head, _UTail&&... __tail)
219 :
_Inherited(std::forward<_UTail>(__tail)...),
220 _Base(std::forward<_UHead>(__head)) { }
233 _Base(std::forward<_Head>(_M_head(__in))) { }
235 template<
typename... _UElements>
240 template<
typename _UHead,
typename... _UTails>
244 _Base(std::forward<_UHead>
247 template<
typename _Alloc>
251 _Base(__tag, __use_alloc<_Head>(__a)) { }
253 template<
typename _Alloc>
255 const _Head& __head,
const _Tail&... __tail)
257 _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { }
259 template<
typename _Alloc,
typename _UHead,
typename... _UTail,
260 typename =
typename enable_if<
sizeof...(_Tail)
261 ==
sizeof...(_UTail)>::type>
264 _UHead&& __head, _UTail&&... __tail)
265 :
_Inherited(__tag, __a, std::forward<_UTail>(__tail)...),
266 _Base(__use_alloc<_Head, _Alloc, _UHead>(__a),
267 std::forward<_UHead>(__head)) { }
269 template<
typename _Alloc>
274 _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { }
276 template<
typename _Alloc>
281 _Base(__use_alloc<_Head, _Alloc, _Head>(__a),
282 std::forward<_Head>(_M_head(__in))) { }
284 template<
typename _Alloc,
typename... _UElements>
290 _Base(__use_alloc<_Head, _Alloc, _Head>(__a),
293 template<
typename _Alloc,
typename _UHead,
typename... _UTails>
299 _Base(__use_alloc<_Head, _Alloc, _UHead>(__a),
303 template<
typename... _UElements>
309 _M_tail(*this)._M_assign(
313 template<
typename _UHead,
typename... _UTails>
318 _M_head(*
this) = std::forward<_UHead>
320 _M_tail(*this)._M_assign(
330 swap(_M_head(*
this), _M_head(__in));
331 _Inherited::_M_swap(_M_tail(__in));
336 template<std::
size_t _Idx,
typename _Head>
338 :
private _Head_base<_Idx, _Head>
340 template<std::size_t,
typename...>
friend class _Tuple_impl;
342 typedef _Head_base<_Idx, _Head> _Base;
344 static constexpr _Head&
345 _M_head(
_Tuple_impl& __t) noexcept {
return _Base::_M_head(__t); }
347 static constexpr
const _Head&
348 _M_head(
const _Tuple_impl& __t) noexcept {
return _Base::_M_head(__t); }
350 constexpr _Tuple_impl()
354 constexpr _Tuple_impl(
const _Head& __head)
357 template<
typename _UHead>
359 constexpr _Tuple_impl(_UHead&& __head)
362 constexpr _Tuple_impl(
const _Tuple_impl&) =
default;
366 _Tuple_impl& operator=(
const _Tuple_impl&) =
delete;
369 _Tuple_impl(_Tuple_impl&& __in)
370 noexcept(is_nothrow_move_constructible<_Head>::value)
371 : _Base(
std::
forward<_Head>(_M_head(__in))) { }
373 template<
typename _UHead>
374 constexpr _Tuple_impl(
const _Tuple_impl<_Idx, _UHead>& __in)
375 : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in)) { }
377 template<
typename _UHead>
378 constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in)
379 : _Base(
std::
forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)))
382 template<
typename _Alloc>
384 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a)
385 : _Base(__tag, __use_alloc<_Head>(__a)) { }
387 template<
typename _Alloc>
388 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a,
390 : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { }
392 template<
typename _Alloc,
typename _UHead>
394 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a,
396 : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a),
399 template<
typename _Alloc>
401 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a,
402 const _Tuple_impl& __in)
403 : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { }
405 template<
typename _Alloc>
407 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a,
409 : _Base(__use_alloc<_Head, _Alloc, _Head>(__a),
412 template<
typename _Alloc,
typename _UHead>
414 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a,
415 const _Tuple_impl<_Idx, _UHead>& __in)
416 : _Base(__use_alloc<_Head, _Alloc, _Head>(__a),
417 _Tuple_impl<_Idx, _UHead>::_M_head(__in)) { }
419 template<
typename _Alloc,
typename _UHead>
421 _Tuple_impl(allocator_arg_t __tag,
const _Alloc& __a,
422 _Tuple_impl<_Idx, _UHead>&& __in)
423 : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a),
424 std::
forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)))
427 template<
typename _UHead>
430 _M_assign(
const _Tuple_impl<_Idx, _UHead>& __in)
432 _M_head(*
this) = _Tuple_impl<_Idx, _UHead>::_M_head(__in);
435 template<
typename _UHead>
438 _M_assign(_Tuple_impl<_Idx, _UHead>&& __in)
441 = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in));
447 _M_swap(_Tuple_impl& __in)
450 swap(_M_head(*
this), _M_head(__in));
456 template<bool,
typename... _Types>
457 struct _TupleConstraints
462 template<
typename... _UTypes>
463 static constexpr
bool __is_implicitly_constructible()
465 return __and_<is_constructible<_Types, _UTypes>...,
466 is_convertible<_UTypes, _Types>...
473 template<
typename... _UTypes>
474 static constexpr
bool __is_explicitly_constructible()
476 return __and_<is_constructible<_Types, _UTypes>...,
477 __not_<__and_<is_convertible<_UTypes, _Types>...>>
481 static constexpr
bool __is_implicitly_default_constructible()
483 return __and_<std::__is_implicitly_default_constructible<_Types>...
487 static constexpr
bool __is_explicitly_default_constructible()
489 return __and_<is_default_constructible<_Types>...,
491 std::__is_implicitly_default_constructible<_Types>...>
498 template<
typename... _Types>
499 struct _TupleConstraints<false, _Types...>
501 template<
typename... _UTypes>
502 static constexpr
bool __is_implicitly_constructible()
505 template<
typename... _UTypes>
506 static constexpr
bool __is_explicitly_constructible()
511 template<
typename... _Elements>
512 class tuple :
public _Tuple_impl<0, _Elements...>
514 typedef _Tuple_impl<0, _Elements...> _Inherited;
517 using _TCC = _TupleConstraints<_Cond, _Elements...>;
520 template<
bool _Dummy>
521 using _ImplicitDefaultCtor = __enable_if_t<
522 _TCC<_Dummy>::__is_implicitly_default_constructible(),
526 template<
bool _Dummy>
527 using _ExplicitDefaultCtor = __enable_if_t<
528 _TCC<_Dummy>::__is_explicitly_default_constructible(),
532 template<
bool _Cond,
typename... _Args>
533 using _ImplicitCtor = __enable_if_t<
534 _TCC<_Cond>::template __is_implicitly_constructible<_Args...>(),
538 template<
bool _Cond,
typename... _Args>
539 using _ExplicitCtor = __enable_if_t<
540 _TCC<_Cond>::template __is_explicitly_constructible<_Args...>(),
543 template<
typename... _UElements>
545 __enable_if_t<
sizeof...(_UElements) ==
sizeof...(_Elements),
bool>
547 {
return __and_<is_assignable<_Elements&, _UElements>...>::value; }
550 template<
typename... _UElements>
551 static constexpr
bool __nothrow_assignable()
554 __and_<is_nothrow_assignable<_Elements&, _UElements>...>::value;
558 template<
typename... _UElements>
559 static constexpr
bool __nothrow_constructible()
562 __and_<is_nothrow_constructible<_Elements, _UElements>...>::value;
566 template<
typename _Up>
567 static constexpr
bool __valid_args()
569 return sizeof...(_Elements) == 1
570 && !is_same<tuple, __remove_cvref_t<_Up>>::value;
574 template<
typename,
typename,
typename... _Tail>
575 static constexpr
bool __valid_args()
576 {
return (
sizeof...(_Tail) + 2) ==
sizeof...(_Elements); }
587 template<
typename _Tuple,
typename = tuple,
588 typename = __remove_cvref_t<_Tuple>>
594 template<
typename _Tuple,
typename _Tp,
typename _Up>
595 struct _UseOtherCtor<_Tuple, tuple<_Tp>, tuple<_Up>>
596 : __or_<is_convertible<_Tuple, _Tp>, is_constructible<_Tp, _Tuple>>
600 template<
typename _Tuple,
typename _Tp>
601 struct _UseOtherCtor<_Tuple, tuple<_Tp>, tuple<_Tp>>
608 template<
typename _Tuple>
609 static constexpr
bool __use_other_ctor()
610 {
return _UseOtherCtor<_Tuple>::value; }
613 template<
typename _Dummy = void,
614 _ImplicitDefaultCtor<is_void<_Dummy>::value> =
true>
617 noexcept(__and_<is_nothrow_default_constructible<_Elements>...>::value)
620 template<
typename _Dummy = void,
621 _ExplicitDefaultCtor<is_void<_Dummy>::value> =
false>
624 noexcept(__and_<is_nothrow_default_constructible<_Elements>...>::value)
627 template<
bool _NotEmpty = (
sizeof...(_Elements) >= 1),
628 _ImplicitCtor<_NotEmpty,
const _Elements&...> =
true>
630 tuple(
const _Elements&... __elements)
631 noexcept(__nothrow_constructible<const _Elements&...>())
632 : _Inherited(__elements...) { }
634 template<
bool _NotEmpty = (
sizeof...(_Elements) >= 1),
635 _ExplicitCtor<_NotEmpty,
const _Elements&...> =
false>
637 tuple(
const _Elements&... __elements)
638 noexcept(__nothrow_constructible<const _Elements&...>())
639 : _Inherited(__elements...) { }
641 template<
typename... _UElements,
642 bool _Valid = __valid_args<_UElements...>(),
643 _ImplicitCtor<_Valid, _UElements...> =
true>
645 tuple(_UElements&&... __elements)
646 noexcept(__nothrow_constructible<_UElements...>())
647 : _Inherited(
std::
forward<_UElements>(__elements)...) { }
649 template<
typename... _UElements,
650 bool _Valid = __valid_args<_UElements...>(),
651 _ExplicitCtor<_Valid, _UElements...> =
false>
653 tuple(_UElements&&... __elements)
654 noexcept(__nothrow_constructible<_UElements...>())
655 : _Inherited(
std::
forward<_UElements>(__elements)...) { }
657 constexpr tuple(
const tuple&) =
default;
659 constexpr tuple(tuple&&) =
default;
661 template<
typename... _UElements,
662 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
663 && !__use_other_ctor<
const tuple<_UElements...>&>(),
664 _ImplicitCtor<_Valid,
const _UElements&...> =
true>
666 tuple(
const tuple<_UElements...>& __in)
667 noexcept(__nothrow_constructible<const _UElements&...>())
668 : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in))
671 template<
typename... _UElements,
672 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
673 && !__use_other_ctor<
const tuple<_UElements...>&>(),
674 _ExplicitCtor<_Valid,
const _UElements&...> =
false>
676 tuple(
const tuple<_UElements...>& __in)
677 noexcept(__nothrow_constructible<const _UElements&...>())
678 : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in))
681 template<
typename... _UElements,
682 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
683 && !__use_other_ctor<tuple<_UElements...>&&>(),
684 _ImplicitCtor<_Valid, _UElements...> =
true>
686 tuple(tuple<_UElements...>&& __in)
687 noexcept(__nothrow_constructible<_UElements...>())
688 : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { }
690 template<
typename... _UElements,
691 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
692 && !__use_other_ctor<tuple<_UElements...>&&>(),
693 _ExplicitCtor<_Valid, _UElements...> =
false>
695 tuple(tuple<_UElements...>&& __in)
696 noexcept(__nothrow_constructible<_UElements...>())
697 : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { }
701 template<
typename _Alloc,
702 _ImplicitDefaultCtor<is_object<_Alloc>::value> =
true>
704 tuple(allocator_arg_t __tag,
const _Alloc& __a)
705 : _Inherited(__tag, __a) { }
707 template<
typename _Alloc,
bool _NotEmpty = (
sizeof...(_Elements) >= 1),
708 _ImplicitCtor<_NotEmpty,
const _Elements&...> =
true>
710 tuple(allocator_arg_t __tag,
const _Alloc& __a,
711 const _Elements&... __elements)
712 : _Inherited(__tag, __a, __elements...) { }
714 template<
typename _Alloc,
bool _NotEmpty = (
sizeof...(_Elements) >= 1),
715 _ExplicitCtor<_NotEmpty,
const _Elements&...> =
false>
718 tuple(allocator_arg_t __tag,
const _Alloc& __a,
719 const _Elements&... __elements)
720 : _Inherited(__tag, __a, __elements...) { }
722 template<
typename _Alloc,
typename... _UElements,
723 bool _Valid = __valid_args<_UElements...>(),
724 _ImplicitCtor<_Valid, _UElements...> =
true>
726 tuple(allocator_arg_t __tag,
const _Alloc& __a,
727 _UElements&&... __elements)
728 : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...)
731 template<
typename _Alloc,
typename... _UElements,
732 bool _Valid = __valid_args<_UElements...>(),
733 _ExplicitCtor<_Valid, _UElements...> =
false>
736 tuple(allocator_arg_t __tag,
const _Alloc& __a,
737 _UElements&&... __elements)
738 : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...)
741 template<
typename _Alloc>
743 tuple(allocator_arg_t __tag,
const _Alloc& __a,
const tuple& __in)
744 : _Inherited(__tag, __a, static_cast<const _Inherited&>(__in)) { }
746 template<
typename _Alloc>
748 tuple(allocator_arg_t __tag,
const _Alloc& __a, tuple&& __in)
749 : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { }
751 template<
typename _Alloc,
typename... _UElements,
752 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
753 && !__use_other_ctor<
const tuple<_UElements...>&>(),
754 _ImplicitCtor<_Valid,
const _UElements&...> =
true>
756 tuple(allocator_arg_t __tag,
const _Alloc& __a,
757 const tuple<_UElements...>& __in)
758 : _Inherited(__tag, __a,
759 static_cast<const _Tuple_impl<0, _UElements...>&>(__in))
762 template<
typename _Alloc,
typename... _UElements,
763 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
764 && !__use_other_ctor<
const tuple<_UElements...>&>(),
765 _ExplicitCtor<_Valid,
const _UElements&...> =
false>
768 tuple(allocator_arg_t __tag,
const _Alloc& __a,
769 const tuple<_UElements...>& __in)
770 : _Inherited(__tag, __a,
771 static_cast<const _Tuple_impl<0, _UElements...>&>(__in))
774 template<
typename _Alloc,
typename... _UElements,
775 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
776 && !__use_other_ctor<tuple<_UElements...>&&>(),
777 _ImplicitCtor<_Valid, _UElements...> =
true>
779 tuple(allocator_arg_t __tag,
const _Alloc& __a,
780 tuple<_UElements...>&& __in)
781 : _Inherited(__tag, __a,
782 static_cast<_Tuple_impl<0, _UElements...>&&>(__in))
785 template<
typename _Alloc,
typename... _UElements,
786 bool _Valid = (
sizeof...(_Elements) ==
sizeof...(_UElements))
787 && !__use_other_ctor<tuple<_UElements...>&&>(),
788 _ExplicitCtor<_Valid, _UElements...> =
false>
791 tuple(allocator_arg_t __tag,
const _Alloc& __a,
792 tuple<_UElements...>&& __in)
793 : _Inherited(__tag, __a,
794 static_cast<_Tuple_impl<0, _UElements...>&&>(__in))
801 operator=(
typename conditional<__assignable<const _Elements&...>(),
803 const __nonesuch&>::type __in)
804 noexcept(__nothrow_assignable<const _Elements&...>())
806 this->_M_assign(__in);
812 operator=(
typename conditional<__assignable<_Elements...>(),
814 __nonesuch&&>::type __in)
815 noexcept(__nothrow_assignable<_Elements...>())
821 template<
typename... _UElements>
823 __enable_if_t<__assignable<
const _UElements&...>(), tuple&>
824 operator=(
const tuple<_UElements...>& __in)
825 noexcept(__nothrow_assignable<const _UElements&...>())
827 this->_M_assign(__in);
831 template<
typename... _UElements>
833 __enable_if_t<__assignable<_UElements...>(), tuple&>
834 operator=(tuple<_UElements...>&& __in)
835 noexcept(__nothrow_assignable<_UElements...>())
845 noexcept(__and_<__is_nothrow_swappable<_Elements>...>::value)
846 { _Inherited::_M_swap(__in); }
849 #if __cpp_deduction_guides >= 201606
850 template<
typename... _UTypes>
851 tuple(_UTypes...) -> tuple<_UTypes...>;
852 template<
typename _T1,
typename _T2>
853 tuple(pair<_T1, _T2>) -> tuple<_T1, _T2>;
854 template<
typename _Alloc,
typename... _UTypes>
855 tuple(allocator_arg_t, _Alloc, _UTypes...) -> tuple<_UTypes...>;
856 template<
typename _Alloc,
typename _T1,
typename _T2>
857 tuple(allocator_arg_t, _Alloc, pair<_T1, _T2>) -> tuple<_T1, _T2>;
858 template<
typename _Alloc,
typename... _UTypes>
859 tuple(allocator_arg_t, _Alloc, tuple<_UTypes...>) -> tuple<_UTypes...>;
867 void swap(tuple&) noexcept { }
872 template<
typename _Alloc>
874 tuple(allocator_arg_t,
const _Alloc&) noexcept { }
875 template<
typename _Alloc>
877 tuple(allocator_arg_t,
const _Alloc&,
const tuple&) noexcept { }
882 template<
typename _T1,
typename _T2>
888 template<
bool _Dummy,
typename _U1,
typename _U2>
889 using _ImplicitDefaultCtor = __enable_if_t<
890 _TupleConstraints<_Dummy, _U1, _U2>::
891 __is_implicitly_default_constructible(),
895 template<
bool _Dummy,
typename _U1,
typename _U2>
896 using _ExplicitDefaultCtor = __enable_if_t<
897 _TupleConstraints<_Dummy, _U1, _U2>::
898 __is_explicitly_default_constructible(),
901 template<
bool _Dummy>
902 using _TCC = _TupleConstraints<_Dummy, _T1, _T2>;
905 template<
bool _Cond,
typename _U1,
typename _U2>
906 using _ImplicitCtor = __enable_if_t<
907 _TCC<_Cond>::template __is_implicitly_constructible<_U1, _U2>(),
911 template<
bool _Cond,
typename _U1,
typename _U2>
912 using _ExplicitCtor = __enable_if_t<
913 _TCC<_Cond>::template __is_explicitly_constructible<_U1, _U2>(),
916 template<
typename _U1,
typename _U2>
917 static constexpr
bool __assignable()
919 return __and_<is_assignable<_T1&, _U1>,
923 template<
typename _U1,
typename _U2>
924 static constexpr
bool __nothrow_assignable()
926 return __and_<is_nothrow_assignable<_T1&, _U1>,
930 template<
typename _U1,
typename _U2>
931 static constexpr
bool __nothrow_constructible()
933 return __and_<is_nothrow_constructible<_T1, _U1>,
937 static constexpr
bool __nothrow_default_constructible()
939 return __and_<is_nothrow_default_constructible<_T1>,
943 template<
typename _U1>
944 static constexpr
bool __is_alloc_arg()
948 template<
bool _Dummy =
true,
949 _ImplicitDefaultCtor<_Dummy, _T1, _T2> =
true>
952 noexcept(__nothrow_default_constructible())
955 template<
bool _Dummy =
true,
956 _ExplicitDefaultCtor<_Dummy, _T1, _T2> =
false>
959 noexcept(__nothrow_default_constructible())
962 template<
bool _Dummy =
true,
963 _ImplicitCtor<_Dummy, const _T1&, const _T2&> =
true>
965 tuple(
const _T1& __a1,
const _T2& __a2)
966 noexcept(__nothrow_constructible<const _T1&, const _T2&>())
969 template<
bool _Dummy =
true,
970 _ExplicitCtor<_Dummy, const _T1&, const _T2&> =
false>
972 tuple(
const _T1& __a1,
const _T2& __a2)
973 noexcept(__nothrow_constructible<const _T1&, const _T2&>())
976 template<
typename _U1,
typename _U2,
977 _ImplicitCtor<!__is_alloc_arg<_U1>(), _U1, _U2> =
true>
979 tuple(_U1&& __a1, _U2&& __a2)
980 noexcept(__nothrow_constructible<_U1, _U2>())
981 :
_Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { }
983 template<
typename _U1,
typename _U2,
984 _ExplicitCtor<!__is_alloc_arg<_U1>(), _U1, _U2> =
false>
986 tuple(_U1&& __a1, _U2&& __a2)
987 noexcept(__nothrow_constructible<_U1, _U2>())
988 :
_Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { }
994 template<
typename _U1,
typename _U2,
995 _ImplicitCtor<true, const _U1&, const _U2&> =
true>
998 noexcept(__nothrow_constructible<const _U1&, const _U2&>())
1001 template<
typename _U1,
typename _U2,
1002 _ExplicitCtor<true, const _U1&, const _U2&> =
false>
1005 noexcept(__nothrow_constructible<const _U1&, const _U2&>())
1008 template<
typename _U1,
typename _U2,
1009 _ImplicitCtor<true, _U1, _U2> =
true>
1012 noexcept(__nothrow_constructible<_U1, _U2>())
1015 template<
typename _U1,
typename _U2,
1016 _ExplicitCtor<true, _U1, _U2> =
false>
1019 noexcept(__nothrow_constructible<_U1, _U2>())
1022 template<
typename _U1,
typename _U2,
1023 _ImplicitCtor<true, const _U1&, const _U2&> =
true>
1026 noexcept(__nothrow_constructible<const _U1&, const _U2&>())
1029 template<
typename _U1,
typename _U2,
1030 _ExplicitCtor<true, const _U1&, const _U2&> =
false>
1033 noexcept(__nothrow_constructible<const _U1&, const _U2&>())
1036 template<
typename _U1,
typename _U2,
1037 _ImplicitCtor<true, _U1, _U2> =
true>
1040 noexcept(__nothrow_constructible<_U1, _U2>())
1042 std::forward<_U2>(__in.
second)) { }
1044 template<
typename _U1,
typename _U2,
1045 _ExplicitCtor<true, _U1, _U2> =
false>
1048 noexcept(__nothrow_constructible<_U1, _U2>())
1050 std::forward<_U2>(__in.
second)) { }
1054 template<
typename _Alloc,
1055 _ImplicitDefaultCtor<is_object<_Alloc>::value, _T1, _T2> =
true>
1056 _GLIBCXX20_CONSTEXPR
1060 template<
typename _Alloc,
bool _Dummy =
true,
1061 _ImplicitCtor<_Dummy, const _T1&, const _T2&> =
true>
1062 _GLIBCXX20_CONSTEXPR
1064 const _T1& __a1,
const _T2& __a2)
1067 template<
typename _Alloc,
bool _Dummy =
true,
1068 _ExplicitCtor<_Dummy, const _T1&, const _T2&> =
false>
1070 _GLIBCXX20_CONSTEXPR
1072 const _T1& __a1,
const _T2& __a2)
1075 template<
typename _Alloc,
typename _U1,
typename _U2,
1076 _ImplicitCtor<true, _U1, _U2> =
true>
1077 _GLIBCXX20_CONSTEXPR
1079 :
_Inherited(__tag, __a, std::forward<_U1>(__a1),
1080 std::forward<_U2>(__a2)) { }
1082 template<
typename _Alloc,
typename _U1,
typename _U2,
1083 _ExplicitCtor<true, _U1, _U2> =
false>
1085 _GLIBCXX20_CONSTEXPR
1087 _U1&& __a1, _U2&& __a2)
1088 :
_Inherited(__tag, __a, std::forward<_U1>(__a1),
1089 std::forward<_U2>(__a2)) { }
1091 template<
typename _Alloc>
1092 _GLIBCXX20_CONSTEXPR
1094 :
_Inherited(__tag, __a, static_cast<const _Inherited&>(__in)) { }
1096 template<
typename _Alloc>
1097 _GLIBCXX20_CONSTEXPR
1099 :
_Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { }
1101 template<
typename _Alloc,
typename _U1,
typename _U2,
1102 _ImplicitCtor<true, const _U1&, const _U2&> =
true>
1103 _GLIBCXX20_CONSTEXPR
1110 template<
typename _Alloc,
typename _U1,
typename _U2,
1111 _ExplicitCtor<true, const _U1&, const _U2&> =
false>
1113 _GLIBCXX20_CONSTEXPR
1120 template<
typename _Alloc,
typename _U1,
typename _U2,
1121 _ImplicitCtor<true, _U1, _U2> =
true>
1122 _GLIBCXX20_CONSTEXPR
1127 template<
typename _Alloc,
typename _U1,
typename _U2,
1128 _ExplicitCtor<true, _U1, _U2> =
false>
1130 _GLIBCXX20_CONSTEXPR
1135 template<
typename _Alloc,
typename _U1,
typename _U2,
1136 _ImplicitCtor<true, const _U1&, const _U2&> =
true>
1137 _GLIBCXX20_CONSTEXPR
1142 template<
typename _Alloc,
typename _U1,
typename _U2,
1143 _ExplicitCtor<true, const _U1&, const _U2&> =
false>
1145 _GLIBCXX20_CONSTEXPR
1150 template<
typename _Alloc,
typename _U1,
typename _U2,
1151 _ImplicitCtor<true, _U1, _U2> =
true>
1152 _GLIBCXX20_CONSTEXPR
1155 std::forward<_U2>(__in.
second)) { }
1157 template<
typename _Alloc,
typename _U1,
typename _U2,
1158 _ExplicitCtor<true, _U1, _U2> =
false>
1160 _GLIBCXX20_CONSTEXPR
1163 std::forward<_U2>(__in.
second)) { }
1167 _GLIBCXX20_CONSTEXPR
1169 operator=(
typename conditional<__assignable<const _T1&, const _T2&>(),
1171 const __nonesuch&>::type __in)
1172 noexcept(__nothrow_assignable<const _T1&, const _T2&>())
1174 this->_M_assign(__in);
1178 _GLIBCXX20_CONSTEXPR
1180 operator=(
typename conditional<__assignable<_T1, _T2>(),
1182 __nonesuch&&>::type __in)
1183 noexcept(__nothrow_assignable<_T1, _T2>())
1189 template<
typename _U1,
typename _U2>
1190 _GLIBCXX20_CONSTEXPR
1191 __enable_if_t<__assignable<const _U1&, const _U2&>(),
tuple&>
1193 noexcept(__nothrow_assignable<const _U1&, const _U2&>())
1195 this->_M_assign(__in);
1199 template<
typename _U1,
typename _U2>
1200 _GLIBCXX20_CONSTEXPR
1201 __enable_if_t<__assignable<_U1, _U2>(),
tuple&>
1203 noexcept(__nothrow_assignable<_U1, _U2>())
1209 template<
typename _U1,
typename _U2>
1210 _GLIBCXX20_CONSTEXPR
1211 __enable_if_t<__assignable<const _U1&, const _U2&>(),
tuple&>
1213 noexcept(__nothrow_assignable<const _U1&, const _U2&>())
1215 this->_M_head(*
this) = __in.
first;
1216 this->_M_tail(*this)._M_head(*
this) = __in.
second;
1220 template<
typename _U1,
typename _U2>
1221 _GLIBCXX20_CONSTEXPR
1222 __enable_if_t<__assignable<_U1, _U2>(),
tuple&>
1224 noexcept(__nothrow_assignable<_U1, _U2>())
1226 this->_M_head(*
this) = std::forward<_U1>(__in.
first);
1227 this->_M_tail(*this)._M_head(*
this) = std::forward<_U2>(__in.
second);
1231 _GLIBCXX20_CONSTEXPR
1234 noexcept(__and_<__is_nothrow_swappable<_T1>,
1235 __is_nothrow_swappable<_T2>>::value)
1236 { _Inherited::_M_swap(__in); }
1241 template<
typename... _Elements>
1245 #if __cplusplus > 201402L
1246 template <
typename _Tp>
1254 template<std::size_t __i,
typename _Head,
typename... _Tail>
1261 template<
typename _Head,
typename... _Tail>
1270 template<
size_t __i>
1274 "tuple index is in range");
1277 template<std::size_t __i,
typename _Head,
typename... _Tail>
1282 template<std::size_t __i,
typename _Head,
typename... _Tail>
1283 constexpr
const _Head&
1284 __get_helper(
const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
1285 {
return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); }
1288 template<std::size_t __i,
typename... _Elements>
1289 constexpr __tuple_element_t<__i, tuple<_Elements...>>&
1291 {
return std::__get_helper<__i>(__t); }
1294 template<std::size_t __i,
typename... _Elements>
1295 constexpr
const __tuple_element_t<__i, tuple<_Elements...>>&
1297 {
return std::__get_helper<__i>(__t); }
1300 template<std::size_t __i,
typename... _Elements>
1301 constexpr __tuple_element_t<__i, tuple<_Elements...>>&&
1304 typedef __tuple_element_t<__i,
tuple<_Elements...>> __element_type;
1305 return std::forward<__element_type&&>(std::get<__i>(__t));
1309 template<std::size_t __i,
typename... _Elements>
1310 constexpr
const __tuple_element_t<__i, tuple<_Elements...>>&&
1313 typedef __tuple_element_t<__i,
tuple<_Elements...>> __element_type;
1314 return std::forward<const __element_type&&>(std::get<__i>(__t));
1317 #if __cplusplus >= 201402L
1319 #define __cpp_lib_tuples_by_type 201304
1321 template<
typename _Head,
size_t __i,
typename... _Tail>
1323 __get_helper2(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
1324 {
return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); }
1326 template<
typename _Head,
size_t __i,
typename... _Tail>
1327 constexpr
const _Head&
1328 __get_helper2(
const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
1329 {
return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); }
1332 template <
typename _Tp,
typename... _Types>
1335 {
return std::__get_helper2<_Tp>(__t); }
1338 template <
typename _Tp,
typename... _Types>
1341 {
return std::forward<_Tp&&>(std::__get_helper2<_Tp>(__t)); }
1344 template <
typename _Tp,
typename... _Types>
1345 constexpr
const _Tp&
1347 {
return std::__get_helper2<_Tp>(__t); }
1351 template <
typename _Tp,
typename... _Types>
1352 constexpr
const _Tp&&
1354 {
return std::forward<const _Tp&&>(std::__get_helper2<_Tp>(__t)); }
1358 template<
typename _Tp,
typename _Up,
size_t __i,
size_t __size>
1359 struct __tuple_compare
1361 static constexpr
bool
1362 __eq(
const _Tp& __t,
const _Up& __u)
1364 return bool(std::get<__i>(__t) == std::get<__i>(__u))
1365 && __tuple_compare<_Tp, _Up, __i + 1, __size>::__eq(__t, __u);
1368 static constexpr
bool
1369 __less(
const _Tp& __t,
const _Up& __u)
1371 return bool(std::get<__i>(__t) < std::get<__i>(__u))
1372 || (!bool(std::get<__i>(__u) < std::get<__i>(__t))
1373 && __tuple_compare<_Tp, _Up, __i + 1, __size>::__less(__t, __u));
1377 template<
typename _Tp,
typename _Up,
size_t __size>
1378 struct __tuple_compare<_Tp, _Up, __size, __size>
1380 static constexpr
bool
1381 __eq(
const _Tp&,
const _Up&) {
return true; }
1383 static constexpr
bool
1384 __less(
const _Tp&,
const _Up&) {
return false; }
1387 template<
typename... _TElements,
typename... _UElements>
1389 operator==(
const tuple<_TElements...>& __t,
1390 const tuple<_UElements...>& __u)
1392 static_assert(
sizeof...(_TElements) ==
sizeof...(_UElements),
1393 "tuple objects can only be compared if they have equal sizes.");
1394 using __compare = __tuple_compare<tuple<_TElements...>,
1395 tuple<_UElements...>,
1396 0,
sizeof...(_TElements)>;
1397 return __compare::__eq(__t, __u);
1400 template<
typename... _TElements,
typename... _UElements>
1402 operator<(
const tuple<_TElements...>& __t,
1403 const tuple<_UElements...>& __u)
1405 static_assert(
sizeof...(_TElements) ==
sizeof...(_UElements),
1406 "tuple objects can only be compared if they have equal sizes.");
1407 using __compare = __tuple_compare<tuple<_TElements...>,
1408 tuple<_UElements...>,
1409 0,
sizeof...(_TElements)>;
1410 return __compare::__less(__t, __u);
1413 template<
typename... _TElements,
typename... _UElements>
1415 operator!=(
const tuple<_TElements...>& __t,
1416 const tuple<_UElements...>& __u)
1417 {
return !(__t == __u); }
1419 template<
typename... _TElements,
typename... _UElements>
1421 operator>(
const tuple<_TElements...>& __t,
1422 const tuple<_UElements...>& __u)
1423 {
return __u < __t; }
1425 template<
typename... _TElements,
typename... _UElements>
1427 operator<=(
const tuple<_TElements...>& __t,
1428 const tuple<_UElements...>& __u)
1429 {
return !(__u < __t); }
1431 template<
typename... _TElements,
typename... _UElements>
1433 operator>=(
const tuple<_TElements...>& __t,
1434 const tuple<_UElements...>& __u)
1435 {
return !(__t < __u); }
1438 template<
typename... _Elements>
1439 constexpr tuple<typename __decay_and_strip<_Elements>::__type...>
1440 make_tuple(_Elements&&... __args)
1442 typedef tuple<typename __decay_and_strip<_Elements>::__type...>
1444 return __result_type(std::forward<_Elements>(__args)...);
1450 template<
typename... _Elements>
1451 constexpr tuple<_Elements&&...>
1453 {
return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); }
1455 template<
size_t,
typename,
typename,
size_t>
1456 struct __make_tuple_impl;
1458 template<
size_t _Idx,
typename _Tuple,
typename... _Tp,
size_t _Nm>
1459 struct __make_tuple_impl<_Idx, tuple<_Tp...>, _Tuple, _Nm>
1460 : __make_tuple_impl<_Idx + 1,
1461 tuple<_Tp..., __tuple_element_t<_Idx, _Tuple>>,
1465 template<std::size_t _Nm,
typename _Tuple,
typename... _Tp>
1466 struct __make_tuple_impl<_Nm, tuple<_Tp...>, _Tuple, _Nm>
1468 typedef tuple<_Tp...> __type;
1471 template<
typename _Tuple>
1472 struct __do_make_tuple
1473 : __make_tuple_impl<0, tuple<>, _Tuple, std::tuple_size<_Tuple>::value>
1477 template<
typename _Tuple>
1479 :
public __do_make_tuple<__remove_cvref_t<_Tuple>>
1483 template<
typename...>
1484 struct __combine_tuples;
1487 struct __combine_tuples<>
1489 typedef tuple<> __type;
1492 template<
typename... _Ts>
1493 struct __combine_tuples<tuple<_Ts...>>
1495 typedef tuple<_Ts...> __type;
1498 template<
typename... _T1s,
typename... _T2s,
typename... _Rem>
1499 struct __combine_tuples<tuple<_T1s...>, tuple<_T2s...>, _Rem...>
1501 typedef typename __combine_tuples<tuple<_T1s..., _T2s...>,
1502 _Rem...>::__type __type;
1506 template<
typename... _Tpls>
1507 struct __tuple_cat_result
1509 typedef typename __combine_tuples
1510 <
typename __make_tuple<_Tpls>::__type...>::__type __type;
1515 template<
typename...>
1516 struct __make_1st_indices;
1519 struct __make_1st_indices<>
1521 typedef std::_Index_tuple<> __type;
1524 template<
typename _Tp,
typename... _Tpls>
1525 struct __make_1st_indices<_Tp, _Tpls...>
1528 typename std::remove_reference<_Tp>::type>::value>::__type __type;
1534 template<
typename _Ret,
typename _Indices,
typename... _Tpls>
1535 struct __tuple_concater;
1537 template<
typename _Ret, std::size_t... _Is,
typename _Tp,
typename... _Tpls>
1538 struct __tuple_concater<_Ret,
std::_Index_tuple<_Is...>, _Tp, _Tpls...>
1540 template<
typename... _Us>
1541 static constexpr _Ret
1542 _S_do(_Tp&& __tp, _Tpls&&... __tps, _Us&&... __us)
1544 typedef typename __make_1st_indices<_Tpls...>::__type __idx;
1545 typedef __tuple_concater<_Ret, __idx, _Tpls...> __next;
1546 return __next::_S_do(std::forward<_Tpls>(__tps)...,
1547 std::forward<_Us>(__us)...,
1548 std::get<_Is>(std::forward<_Tp>(__tp))...);
1552 template<
typename _Ret>
1553 struct __tuple_concater<_Ret,
std::_Index_tuple<>>
1555 template<
typename... _Us>
1556 static constexpr _Ret
1557 _S_do(_Us&&... __us)
1559 return _Ret(std::forward<_Us>(__us)...);
1564 template<
typename... _Tpls,
typename =
typename
1565 enable_if<__and_<__is_tuple_like<_Tpls>...>::value>::type>
1568 ->
typename __tuple_cat_result<_Tpls...>::__type
1570 typedef typename __tuple_cat_result<_Tpls...>::__type __ret;
1571 typedef typename __make_1st_indices<_Tpls...>::__type __idx;
1572 typedef __tuple_concater<__ret, __idx, _Tpls...> __concater;
1573 return __concater::_S_do(std::forward<_Tpls>(__tpls)...);
1579 template<
typename... _Elements>
1580 constexpr tuple<_Elements&...>
1581 tie(_Elements&... __args) noexcept
1582 {
return tuple<_Elements&...>(__args...); }
1585 template<
typename... _Elements>
1586 _GLIBCXX20_CONSTEXPR
1588 #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
1590 typename enable_if<__and_<__is_swappable<_Elements>...>::value
1596 noexcept(noexcept(__x.swap(__y)))
1599 #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
1600 template<
typename... _Elements>
1601 _GLIBCXX20_CONSTEXPR
1602 typename enable_if<!__and_<__is_swappable<_Elements>...>::value>::type
1603 swap(tuple<_Elements...>&, tuple<_Elements...>&) =
delete;
1610 struct _Swallow_assign
1613 _GLIBCXX14_CONSTEXPR
const _Swallow_assign&
1614 operator=(
const _Tp&)
const
1620 _GLIBCXX17_INLINE constexpr _Swallow_assign ignore{};
1623 template<
typename... _Types,
typename _Alloc>
1635 template<
class _T1,
class _T2>
1636 template<
typename... _Args1,
typename... _Args2>
1637 _GLIBCXX20_CONSTEXPR
1642 :
pair(__first, __second,
1643 typename _Build_index_tuple<sizeof...(_Args1)>::__type(),
1644 typename _Build_index_tuple<sizeof...(_Args2)>::__type())
1647 template<
class _T1,
class _T2>
1648 template<
typename... _Args1, std::size_t... _Indexes1,
1649 typename... _Args2, std::size_t... _Indexes2>
1650 _GLIBCXX20_CONSTEXPR
inline
1653 _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>)
1658 #if __cplusplus >= 201703L
1664 template<
template<
typename...>
class _Trait,
typename _Tp,
typename _Tuple>
1665 inline constexpr
bool __unpack_std_tuple =
false;
1667 template<
template<
typename...>
class _Trait,
typename _Tp,
typename... _Up>
1668 inline constexpr
bool __unpack_std_tuple<_Trait, _Tp, tuple<_Up...>>
1669 = _Trait<_Tp, _Up...>::value;
1671 template<
template<
typename...>
class _Trait,
typename _Tp,
typename... _Up>
1672 inline constexpr
bool __unpack_std_tuple<_Trait, _Tp, tuple<_Up...>&>
1673 = _Trait<_Tp, _Up&...>::value;
1675 template<
template<
typename...>
class _Trait,
typename _Tp,
typename... _Up>
1676 inline constexpr
bool __unpack_std_tuple<_Trait, _Tp,
const tuple<_Up...>>
1677 = _Trait<_Tp,
const _Up...>::value;
1679 template<
template<
typename...>
class _Trait,
typename _Tp,
typename... _Up>
1680 inline constexpr
bool __unpack_std_tuple<_Trait, _Tp,
const tuple<_Up...>&>
1681 = _Trait<_Tp,
const _Up&...>::value;
1683 # define __cpp_lib_apply 201603
1685 template <
typename _Fn,
typename _Tuple,
size_t... _Idx>
1686 constexpr decltype(
auto)
1690 std::get<_Idx>(std::forward<_Tuple>(__t))...);
1693 template <
typename _Fn,
typename _Tuple>
1694 constexpr decltype(
auto)
1695 apply(_Fn&& __f, _Tuple&& __t)
1696 noexcept(__unpack_std_tuple<is_nothrow_invocable, _Fn, _Tuple>)
1699 = make_index_sequence<tuple_size_v<remove_reference_t<_Tuple>>>;
1700 return std::__apply_impl(std::forward<_Fn>(__f),
1701 std::forward<_Tuple>(__t),
1705 #define __cpp_lib_make_from_tuple 201606
1707 template <
typename _Tp,
typename _Tuple,
size_t... _Idx>
1709 __make_from_tuple_impl(_Tuple&& __t, index_sequence<_Idx...>)
1710 {
return _Tp(std::get<_Idx>(std::forward<_Tuple>(__t))...); }
1712 template <
typename _Tp,
typename _Tuple>
1714 make_from_tuple(_Tuple&& __t)
1715 noexcept(__unpack_std_tuple<is_nothrow_constructible, _Tp, _Tuple>)
1717 return __make_from_tuple_impl<_Tp>(
1718 std::forward<_Tuple>(__t),
1725 _GLIBCXX_END_NAMESPACE_VERSION
1730 #endif // _GLIBCXX_TUPLE