xref: /minix3/external/bsd/libc++/dist/libcxx/include/__tuple (revision 4684ddb6aab0b36791c8099bc705d6140b3d05d0)
1*4684ddb6SLionel Sambuc// -*- C++ -*-
2*4684ddb6SLionel Sambuc//===----------------------------------------------------------------------===//
3*4684ddb6SLionel Sambuc//
4*4684ddb6SLionel Sambuc//                     The LLVM Compiler Infrastructure
5*4684ddb6SLionel Sambuc//
6*4684ddb6SLionel Sambuc// This file is dual licensed under the MIT and the University of Illinois Open
7*4684ddb6SLionel Sambuc// Source Licenses. See LICENSE.TXT for details.
8*4684ddb6SLionel Sambuc//
9*4684ddb6SLionel Sambuc//===----------------------------------------------------------------------===//
10*4684ddb6SLionel Sambuc
11*4684ddb6SLionel Sambuc#ifndef _LIBCPP___TUPLE
12*4684ddb6SLionel Sambuc#define _LIBCPP___TUPLE
13*4684ddb6SLionel Sambuc
14*4684ddb6SLionel Sambuc#include <__config>
15*4684ddb6SLionel Sambuc#include <cstddef>
16*4684ddb6SLionel Sambuc#include <type_traits>
17*4684ddb6SLionel Sambuc
18*4684ddb6SLionel Sambuc#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
19*4684ddb6SLionel Sambuc#pragma GCC system_header
20*4684ddb6SLionel Sambuc#endif
21*4684ddb6SLionel Sambuc
22*4684ddb6SLionel Sambuc#ifdef _LIBCPP_HAS_NO_VARIADICS
23*4684ddb6SLionel Sambuc
24*4684ddb6SLionel Sambuc#include <__tuple_03>
25*4684ddb6SLionel Sambuc
26*4684ddb6SLionel Sambuc#else  // _LIBCPP_HAS_NO_VARIADICS
27*4684ddb6SLionel Sambuc
28*4684ddb6SLionel Sambuc_LIBCPP_BEGIN_NAMESPACE_STD
29*4684ddb6SLionel Sambuc
30*4684ddb6SLionel Sambuctemplate <class _Tp> class _LIBCPP_TYPE_VIS_ONLY tuple_size;
31*4684ddb6SLionel Sambuc
32*4684ddb6SLionel Sambuctemplate <class _Tp>
33*4684ddb6SLionel Sambucclass _LIBCPP_TYPE_VIS_ONLY tuple_size<const _Tp>
34*4684ddb6SLionel Sambuc    : public tuple_size<_Tp> {};
35*4684ddb6SLionel Sambuc
36*4684ddb6SLionel Sambuctemplate <class _Tp>
37*4684ddb6SLionel Sambucclass _LIBCPP_TYPE_VIS_ONLY tuple_size<volatile _Tp>
38*4684ddb6SLionel Sambuc    : public tuple_size<_Tp> {};
39*4684ddb6SLionel Sambuc
40*4684ddb6SLionel Sambuctemplate <class _Tp>
41*4684ddb6SLionel Sambucclass _LIBCPP_TYPE_VIS_ONLY tuple_size<const volatile _Tp>
42*4684ddb6SLionel Sambuc    : public tuple_size<_Tp> {};
43*4684ddb6SLionel Sambuc
44*4684ddb6SLionel Sambuctemplate <size_t _Ip, class _Tp> class _LIBCPP_TYPE_VIS_ONLY tuple_element;
45*4684ddb6SLionel Sambuc
46*4684ddb6SLionel Sambuctemplate <size_t _Ip, class _Tp>
47*4684ddb6SLionel Sambucclass _LIBCPP_TYPE_VIS_ONLY tuple_element<_Ip, const _Tp>
48*4684ddb6SLionel Sambuc{
49*4684ddb6SLionel Sambucpublic:
50*4684ddb6SLionel Sambuc    typedef typename add_const<typename tuple_element<_Ip, _Tp>::type>::type type;
51*4684ddb6SLionel Sambuc};
52*4684ddb6SLionel Sambuc
53*4684ddb6SLionel Sambuctemplate <size_t _Ip, class _Tp>
54*4684ddb6SLionel Sambucclass _LIBCPP_TYPE_VIS_ONLY tuple_element<_Ip, volatile _Tp>
55*4684ddb6SLionel Sambuc{
56*4684ddb6SLionel Sambucpublic:
57*4684ddb6SLionel Sambuc    typedef typename add_volatile<typename tuple_element<_Ip, _Tp>::type>::type type;
58*4684ddb6SLionel Sambuc};
59*4684ddb6SLionel Sambuc
60*4684ddb6SLionel Sambuctemplate <size_t _Ip, class _Tp>
61*4684ddb6SLionel Sambucclass _LIBCPP_TYPE_VIS_ONLY tuple_element<_Ip, const volatile _Tp>
62*4684ddb6SLionel Sambuc{
63*4684ddb6SLionel Sambucpublic:
64*4684ddb6SLionel Sambuc    typedef typename add_cv<typename tuple_element<_Ip, _Tp>::type>::type type;
65*4684ddb6SLionel Sambuc};
66*4684ddb6SLionel Sambuc
67*4684ddb6SLionel Sambuctemplate <class ..._Tp> class _LIBCPP_TYPE_VIS_ONLY tuple;
68*4684ddb6SLionel Sambuctemplate <class _T1, class _T2> struct _LIBCPP_TYPE_VIS_ONLY pair;
69*4684ddb6SLionel Sambuctemplate <class _Tp, size_t _Size> struct _LIBCPP_TYPE_VIS_ONLY array;
70*4684ddb6SLionel Sambuc
71*4684ddb6SLionel Sambuctemplate <class _Tp> struct __tuple_like : false_type {};
72*4684ddb6SLionel Sambuc
73*4684ddb6SLionel Sambuctemplate <class _Tp> struct __tuple_like<const _Tp> : public __tuple_like<_Tp> {};
74*4684ddb6SLionel Sambuctemplate <class _Tp> struct __tuple_like<volatile _Tp> : public __tuple_like<_Tp> {};
75*4684ddb6SLionel Sambuctemplate <class _Tp> struct __tuple_like<const volatile _Tp> : public __tuple_like<_Tp> {};
76*4684ddb6SLionel Sambuc
77*4684ddb6SLionel Sambuctemplate <class... _Tp> struct __tuple_like<tuple<_Tp...> > : true_type {};
78*4684ddb6SLionel Sambuctemplate <class _T1, class _T2> struct __tuple_like<pair<_T1, _T2> > : true_type {};
79*4684ddb6SLionel Sambuctemplate <class _Tp, size_t _Size> struct __tuple_like<array<_Tp, _Size> > : true_type {};
80*4684ddb6SLionel Sambuc
81*4684ddb6SLionel Sambuctemplate <size_t _Ip, class ..._Tp>
82*4684ddb6SLionel Sambuc_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
83*4684ddb6SLionel Sambuctypename tuple_element<_Ip, tuple<_Tp...> >::type&
84*4684ddb6SLionel Sambucget(tuple<_Tp...>&) _NOEXCEPT;
85*4684ddb6SLionel Sambuc
86*4684ddb6SLionel Sambuctemplate <size_t _Ip, class ..._Tp>
87*4684ddb6SLionel Sambuc_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
88*4684ddb6SLionel Sambucconst typename tuple_element<_Ip, tuple<_Tp...> >::type&
89*4684ddb6SLionel Sambucget(const tuple<_Tp...>&) _NOEXCEPT;
90*4684ddb6SLionel Sambuc
91*4684ddb6SLionel Sambuctemplate <size_t _Ip, class ..._Tp>
92*4684ddb6SLionel Sambuc_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
93*4684ddb6SLionel Sambuctypename tuple_element<_Ip, tuple<_Tp...> >::type&&
94*4684ddb6SLionel Sambucget(tuple<_Tp...>&&) _NOEXCEPT;
95*4684ddb6SLionel Sambuc
96*4684ddb6SLionel Sambuctemplate <size_t _Ip, class _T1, class _T2>
97*4684ddb6SLionel Sambuc_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
98*4684ddb6SLionel Sambuctypename tuple_element<_Ip, pair<_T1, _T2> >::type&
99*4684ddb6SLionel Sambucget(pair<_T1, _T2>&) _NOEXCEPT;
100*4684ddb6SLionel Sambuc
101*4684ddb6SLionel Sambuctemplate <size_t _Ip, class _T1, class _T2>
102*4684ddb6SLionel Sambuc_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
103*4684ddb6SLionel Sambucconst typename tuple_element<_Ip, pair<_T1, _T2> >::type&
104*4684ddb6SLionel Sambucget(const pair<_T1, _T2>&) _NOEXCEPT;
105*4684ddb6SLionel Sambuc
106*4684ddb6SLionel Sambuctemplate <size_t _Ip, class _T1, class _T2>
107*4684ddb6SLionel Sambuc_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
108*4684ddb6SLionel Sambuctypename tuple_element<_Ip, pair<_T1, _T2> >::type&&
109*4684ddb6SLionel Sambucget(pair<_T1, _T2>&&) _NOEXCEPT;
110*4684ddb6SLionel Sambuc
111*4684ddb6SLionel Sambuctemplate <size_t _Ip, class _Tp, size_t _Size>
112*4684ddb6SLionel Sambuc_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
113*4684ddb6SLionel Sambuc_Tp&
114*4684ddb6SLionel Sambucget(array<_Tp, _Size>&) _NOEXCEPT;
115*4684ddb6SLionel Sambuc
116*4684ddb6SLionel Sambuctemplate <size_t _Ip, class _Tp, size_t _Size>
117*4684ddb6SLionel Sambuc_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
118*4684ddb6SLionel Sambucconst _Tp&
119*4684ddb6SLionel Sambucget(const array<_Tp, _Size>&) _NOEXCEPT;
120*4684ddb6SLionel Sambuc
121*4684ddb6SLionel Sambuctemplate <size_t _Ip, class _Tp, size_t _Size>
122*4684ddb6SLionel Sambuc_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
123*4684ddb6SLionel Sambuc_Tp&&
124*4684ddb6SLionel Sambucget(array<_Tp, _Size>&&) _NOEXCEPT;
125*4684ddb6SLionel Sambuc
126*4684ddb6SLionel Sambuc// __make_tuple_indices
127*4684ddb6SLionel Sambuc
128*4684ddb6SLionel Sambuctemplate <size_t...> struct __tuple_indices {};
129*4684ddb6SLionel Sambuc
130*4684ddb6SLionel Sambuctemplate <size_t _Sp, class _IntTuple, size_t _Ep>
131*4684ddb6SLionel Sambucstruct __make_indices_imp;
132*4684ddb6SLionel Sambuc
133*4684ddb6SLionel Sambuctemplate <size_t _Sp, size_t ..._Indices, size_t _Ep>
134*4684ddb6SLionel Sambucstruct __make_indices_imp<_Sp, __tuple_indices<_Indices...>, _Ep>
135*4684ddb6SLionel Sambuc{
136*4684ddb6SLionel Sambuc    typedef typename __make_indices_imp<_Sp+1, __tuple_indices<_Indices..., _Sp>, _Ep>::type type;
137*4684ddb6SLionel Sambuc};
138*4684ddb6SLionel Sambuc
139*4684ddb6SLionel Sambuctemplate <size_t _Ep, size_t ..._Indices>
140*4684ddb6SLionel Sambucstruct __make_indices_imp<_Ep, __tuple_indices<_Indices...>, _Ep>
141*4684ddb6SLionel Sambuc{
142*4684ddb6SLionel Sambuc    typedef __tuple_indices<_Indices...> type;
143*4684ddb6SLionel Sambuc};
144*4684ddb6SLionel Sambuc
145*4684ddb6SLionel Sambuctemplate <size_t _Ep, size_t _Sp = 0>
146*4684ddb6SLionel Sambucstruct __make_tuple_indices
147*4684ddb6SLionel Sambuc{
148*4684ddb6SLionel Sambuc    static_assert(_Sp <= _Ep, "__make_tuple_indices input error");
149*4684ddb6SLionel Sambuc    typedef typename __make_indices_imp<_Sp, __tuple_indices<>, _Ep>::type type;
150*4684ddb6SLionel Sambuc};
151*4684ddb6SLionel Sambuc
152*4684ddb6SLionel Sambuc// __tuple_types
153*4684ddb6SLionel Sambuc
154*4684ddb6SLionel Sambuctemplate <class ..._Tp> struct __tuple_types {};
155*4684ddb6SLionel Sambuc
156*4684ddb6SLionel Sambuctemplate <size_t _Ip>
157*4684ddb6SLionel Sambucclass _LIBCPP_TYPE_VIS_ONLY tuple_element<_Ip, __tuple_types<> >
158*4684ddb6SLionel Sambuc{
159*4684ddb6SLionel Sambucpublic:
160*4684ddb6SLionel Sambuc    static_assert(_Ip == 0, "tuple_element index out of range");
161*4684ddb6SLionel Sambuc    static_assert(_Ip != 0, "tuple_element index out of range");
162*4684ddb6SLionel Sambuc};
163*4684ddb6SLionel Sambuc
164*4684ddb6SLionel Sambuctemplate <class _Hp, class ..._Tp>
165*4684ddb6SLionel Sambucclass _LIBCPP_TYPE_VIS_ONLY tuple_element<0, __tuple_types<_Hp, _Tp...> >
166*4684ddb6SLionel Sambuc{
167*4684ddb6SLionel Sambucpublic:
168*4684ddb6SLionel Sambuc    typedef _Hp type;
169*4684ddb6SLionel Sambuc};
170*4684ddb6SLionel Sambuc
171*4684ddb6SLionel Sambuctemplate <size_t _Ip, class _Hp, class ..._Tp>
172*4684ddb6SLionel Sambucclass _LIBCPP_TYPE_VIS_ONLY tuple_element<_Ip, __tuple_types<_Hp, _Tp...> >
173*4684ddb6SLionel Sambuc{
174*4684ddb6SLionel Sambucpublic:
175*4684ddb6SLionel Sambuc    typedef typename tuple_element<_Ip-1, __tuple_types<_Tp...> >::type type;
176*4684ddb6SLionel Sambuc};
177*4684ddb6SLionel Sambuc
178*4684ddb6SLionel Sambuctemplate <class ..._Tp>
179*4684ddb6SLionel Sambucclass _LIBCPP_TYPE_VIS_ONLY tuple_size<__tuple_types<_Tp...> >
180*4684ddb6SLionel Sambuc    : public integral_constant<size_t, sizeof...(_Tp)>
181*4684ddb6SLionel Sambuc{
182*4684ddb6SLionel Sambuc};
183*4684ddb6SLionel Sambuc
184*4684ddb6SLionel Sambuctemplate <class... _Tp> struct __tuple_like<__tuple_types<_Tp...> > : true_type {};
185*4684ddb6SLionel Sambuc
186*4684ddb6SLionel Sambuc// __make_tuple_types
187*4684ddb6SLionel Sambuc
188*4684ddb6SLionel Sambuc// __make_tuple_types<_Tuple<_Types...>, _Ep, _Sp>::type is a
189*4684ddb6SLionel Sambuc// __tuple_types<_Types...> using only those _Types in the range [_Sp, _Ep).
190*4684ddb6SLionel Sambuc// _Sp defaults to 0 and _Ep defaults to tuple_size<_Tuple>.  If _Tuple is a
191*4684ddb6SLionel Sambuc// lvalue_reference type, then __tuple_types<_Types&...> is the result.
192*4684ddb6SLionel Sambuc
193*4684ddb6SLionel Sambuctemplate <class _TupleTypes, class _Tp, size_t _Sp, size_t _Ep>
194*4684ddb6SLionel Sambucstruct __make_tuple_types_imp;
195*4684ddb6SLionel Sambuc
196*4684ddb6SLionel Sambuctemplate <class ..._Types, class _Tp, size_t _Sp, size_t _Ep>
197*4684ddb6SLionel Sambucstruct __make_tuple_types_imp<__tuple_types<_Types...>, _Tp, _Sp, _Ep>
198*4684ddb6SLionel Sambuc{
199*4684ddb6SLionel Sambuc    typedef typename remove_reference<_Tp>::type _Tpr;
200*4684ddb6SLionel Sambuc    typedef typename __make_tuple_types_imp<__tuple_types<_Types...,
201*4684ddb6SLionel Sambuc                                            typename conditional<is_lvalue_reference<_Tp>::value,
202*4684ddb6SLionel Sambuc                                                typename tuple_element<_Sp, _Tpr>::type&,
203*4684ddb6SLionel Sambuc                                                typename tuple_element<_Sp, _Tpr>::type>::type>,
204*4684ddb6SLionel Sambuc                                            _Tp, _Sp+1, _Ep>::type type;
205*4684ddb6SLionel Sambuc};
206*4684ddb6SLionel Sambuc
207*4684ddb6SLionel Sambuctemplate <class ..._Types, class _Tp, size_t _Ep>
208*4684ddb6SLionel Sambucstruct __make_tuple_types_imp<__tuple_types<_Types...>, _Tp, _Ep, _Ep>
209*4684ddb6SLionel Sambuc{
210*4684ddb6SLionel Sambuc    typedef __tuple_types<_Types...> type;
211*4684ddb6SLionel Sambuc};
212*4684ddb6SLionel Sambuc
213*4684ddb6SLionel Sambuctemplate <class _Tp, size_t _Ep = tuple_size<typename remove_reference<_Tp>::type>::value, size_t _Sp = 0>
214*4684ddb6SLionel Sambucstruct __make_tuple_types
215*4684ddb6SLionel Sambuc{
216*4684ddb6SLionel Sambuc    static_assert(_Sp <= _Ep, "__make_tuple_types input error");
217*4684ddb6SLionel Sambuc    typedef typename __make_tuple_types_imp<__tuple_types<>, _Tp, _Sp, _Ep>::type type;
218*4684ddb6SLionel Sambuc};
219*4684ddb6SLionel Sambuc
220*4684ddb6SLionel Sambuc// __tuple_convertible
221*4684ddb6SLionel Sambuc
222*4684ddb6SLionel Sambuctemplate <bool, class _Tp, class _Up>
223*4684ddb6SLionel Sambucstruct __tuple_convertible_imp : public false_type {};
224*4684ddb6SLionel Sambuc
225*4684ddb6SLionel Sambuctemplate <class _Tp0, class ..._Tp, class _Up0, class ..._Up>
226*4684ddb6SLionel Sambucstruct __tuple_convertible_imp<true, __tuple_types<_Tp0, _Tp...>, __tuple_types<_Up0, _Up...> >
227*4684ddb6SLionel Sambuc    : public integral_constant<bool,
228*4684ddb6SLionel Sambuc                               is_convertible<_Tp0, _Up0>::value &&
229*4684ddb6SLionel Sambuc                               __tuple_convertible_imp<true, __tuple_types<_Tp...>, __tuple_types<_Up...> >::value> {};
230*4684ddb6SLionel Sambuc
231*4684ddb6SLionel Sambuctemplate <>
232*4684ddb6SLionel Sambucstruct __tuple_convertible_imp<true, __tuple_types<>, __tuple_types<> >
233*4684ddb6SLionel Sambuc    : public true_type {};
234*4684ddb6SLionel Sambuc
235*4684ddb6SLionel Sambuctemplate <class _Tp, class _Up, bool = __tuple_like<typename remove_reference<_Tp>::type>::value,
236*4684ddb6SLionel Sambuc                                bool = __tuple_like<_Up>::value>
237*4684ddb6SLionel Sambucstruct __tuple_convertible
238*4684ddb6SLionel Sambuc    : public false_type {};
239*4684ddb6SLionel Sambuc
240*4684ddb6SLionel Sambuctemplate <class _Tp, class _Up>
241*4684ddb6SLionel Sambucstruct __tuple_convertible<_Tp, _Up, true, true>
242*4684ddb6SLionel Sambuc    : public __tuple_convertible_imp<tuple_size<typename remove_reference<_Tp>::type>::value ==
243*4684ddb6SLionel Sambuc                                     tuple_size<_Up>::value,
244*4684ddb6SLionel Sambuc             typename __make_tuple_types<_Tp>::type, typename __make_tuple_types<_Up>::type>
245*4684ddb6SLionel Sambuc{};
246*4684ddb6SLionel Sambuc
247*4684ddb6SLionel Sambuc// __tuple_constructible
248*4684ddb6SLionel Sambuc
249*4684ddb6SLionel Sambuctemplate <bool, class _Tp, class _Up>
250*4684ddb6SLionel Sambucstruct __tuple_constructible_imp : public false_type {};
251*4684ddb6SLionel Sambuc
252*4684ddb6SLionel Sambuctemplate <class _Tp0, class ..._Tp, class _Up0, class ..._Up>
253*4684ddb6SLionel Sambucstruct __tuple_constructible_imp<true, __tuple_types<_Tp0, _Tp...>, __tuple_types<_Up0, _Up...> >
254*4684ddb6SLionel Sambuc    : public integral_constant<bool,
255*4684ddb6SLionel Sambuc                               is_constructible<_Up0, _Tp0>::value &&
256*4684ddb6SLionel Sambuc                               __tuple_constructible_imp<true, __tuple_types<_Tp...>, __tuple_types<_Up...> >::value> {};
257*4684ddb6SLionel Sambuc
258*4684ddb6SLionel Sambuctemplate <>
259*4684ddb6SLionel Sambucstruct __tuple_constructible_imp<true, __tuple_types<>, __tuple_types<> >
260*4684ddb6SLionel Sambuc    : public true_type {};
261*4684ddb6SLionel Sambuc
262*4684ddb6SLionel Sambuctemplate <class _Tp, class _Up, bool = __tuple_like<typename remove_reference<_Tp>::type>::value,
263*4684ddb6SLionel Sambuc                                bool = __tuple_like<_Up>::value>
264*4684ddb6SLionel Sambucstruct __tuple_constructible
265*4684ddb6SLionel Sambuc    : public false_type {};
266*4684ddb6SLionel Sambuc
267*4684ddb6SLionel Sambuctemplate <class _Tp, class _Up>
268*4684ddb6SLionel Sambucstruct __tuple_constructible<_Tp, _Up, true, true>
269*4684ddb6SLionel Sambuc    : public __tuple_constructible_imp<tuple_size<typename remove_reference<_Tp>::type>::value ==
270*4684ddb6SLionel Sambuc                                     tuple_size<_Up>::value,
271*4684ddb6SLionel Sambuc             typename __make_tuple_types<_Tp>::type, typename __make_tuple_types<_Up>::type>
272*4684ddb6SLionel Sambuc{};
273*4684ddb6SLionel Sambuc
274*4684ddb6SLionel Sambuc// __tuple_assignable
275*4684ddb6SLionel Sambuc
276*4684ddb6SLionel Sambuctemplate <bool, class _Tp, class _Up>
277*4684ddb6SLionel Sambucstruct __tuple_assignable_imp : public false_type {};
278*4684ddb6SLionel Sambuc
279*4684ddb6SLionel Sambuctemplate <class _Tp0, class ..._Tp, class _Up0, class ..._Up>
280*4684ddb6SLionel Sambucstruct __tuple_assignable_imp<true, __tuple_types<_Tp0, _Tp...>, __tuple_types<_Up0, _Up...> >
281*4684ddb6SLionel Sambuc    : public integral_constant<bool,
282*4684ddb6SLionel Sambuc                               is_assignable<_Up0&, _Tp0>::value &&
283*4684ddb6SLionel Sambuc                               __tuple_assignable_imp<true, __tuple_types<_Tp...>, __tuple_types<_Up...> >::value> {};
284*4684ddb6SLionel Sambuc
285*4684ddb6SLionel Sambuctemplate <>
286*4684ddb6SLionel Sambucstruct __tuple_assignable_imp<true, __tuple_types<>, __tuple_types<> >
287*4684ddb6SLionel Sambuc    : public true_type {};
288*4684ddb6SLionel Sambuc
289*4684ddb6SLionel Sambuctemplate <class _Tp, class _Up, bool = __tuple_like<typename remove_reference<_Tp>::type>::value,
290*4684ddb6SLionel Sambuc                                bool = __tuple_like<_Up>::value>
291*4684ddb6SLionel Sambucstruct __tuple_assignable
292*4684ddb6SLionel Sambuc    : public false_type {};
293*4684ddb6SLionel Sambuc
294*4684ddb6SLionel Sambuctemplate <class _Tp, class _Up>
295*4684ddb6SLionel Sambucstruct __tuple_assignable<_Tp, _Up, true, true>
296*4684ddb6SLionel Sambuc    : public __tuple_assignable_imp<tuple_size<typename remove_reference<_Tp>::type>::value ==
297*4684ddb6SLionel Sambuc                                    tuple_size<_Up>::value,
298*4684ddb6SLionel Sambuc             typename __make_tuple_types<_Tp>::type, typename __make_tuple_types<_Up>::type>
299*4684ddb6SLionel Sambuc{};
300*4684ddb6SLionel Sambuc
301*4684ddb6SLionel Sambuc_LIBCPP_END_NAMESPACE_STD
302*4684ddb6SLionel Sambuc
303*4684ddb6SLionel Sambuc#endif  // _LIBCPP_HAS_NO_VARIADICS
304*4684ddb6SLionel Sambuc
305*4684ddb6SLionel Sambuc#endif  // _LIBCPP___TUPLE
306