3 // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 3, or (at your option)
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
25 /** @file include/tuple
26 * This is a Standard C++ Library header.
29 #ifndef _GLIBCXX_TUPLE
30 #define _GLIBCXX_TUPLE 1
32 #pragma GCC system_header
34 #ifndef __GXX_EXPERIMENTAL_CXX0X__
35 # include <bits/c++0x_warning.h>
40 namespace std _GLIBCXX_VISIBILITY(default)
42 _GLIBCXX_BEGIN_NAMESPACE_VERSION
44 // Adds a const reference to a non-reference type.
45 template<typename _Tp>
47 { typedef const _Tp& type; };
49 template<typename _Tp>
50 struct __add_c_ref<_Tp&>
51 { typedef _Tp& type; };
53 // Adds a reference to a non-reference type.
54 template<typename _Tp>
56 { typedef _Tp& type; };
58 template<typename _Tp>
59 struct __add_ref<_Tp&>
60 { typedef _Tp& type; };
62 // Adds an rvalue reference to a non-reference type.
63 template<typename _Tp>
65 { typedef _Tp&& type; };
67 template<typename _Tp>
68 struct __add_r_ref<_Tp&>
69 { typedef _Tp& type; };
71 template<std::size_t _Idx, typename _Head, bool _IsEmpty>
74 template<std::size_t _Idx, typename _Head>
75 struct _Head_base<_Idx, _Head, true>
78 constexpr _Head_base()
81 constexpr _Head_base(const _Head& __h)
84 template<typename _UHead>
85 _Head_base(_UHead&& __h)
86 : _Head(std::forward<_UHead>(__h)) { }
88 _Head& _M_head() { return *this; }
89 const _Head& _M_head() const { return *this; }
92 template<std::size_t _Idx, typename _Head>
93 struct _Head_base<_Idx, _Head, false>
95 constexpr _Head_base()
98 constexpr _Head_base(const _Head& __h)
99 : _M_head_impl(__h) { }
101 template<typename _UHead>
102 _Head_base(_UHead&& __h)
103 : _M_head_impl(std::forward<_UHead>(__h)) { }
105 _Head& _M_head() { return _M_head_impl; }
106 const _Head& _M_head() const { return _M_head_impl; }
112 * Contains the actual implementation of the @c tuple template, stored
113 * as a recursive inheritance hierarchy from the first element (most
114 * derived class) to the last (least derived class). The @c Idx
115 * parameter gives the 0-based index of the element stored at this
116 * point in the hierarchy; we use it to implement a constant-time
119 template<std::size_t _Idx, typename... _Elements>
123 * Zero-element tuple implementation. This is the basis case for the
124 * inheritance recursion.
126 template<std::size_t _Idx>
127 struct _Tuple_impl<_Idx>
129 template<std::size_t, typename...> friend class _Tuple_impl;
132 void _M_swap(_Tuple_impl&) noexcept { /* no-op */ }
136 * Recursive tuple implementation. Here we store the @c Head element
137 * and derive from a @c Tuple_impl containing the remaining elements
138 * (which contains the @c Tail).
140 template<std::size_t _Idx, typename _Head, typename... _Tail>
141 struct _Tuple_impl<_Idx, _Head, _Tail...>
142 : public _Tuple_impl<_Idx + 1, _Tail...>,
143 private _Head_base<_Idx, _Head, std::is_empty<_Head>::value>
145 template<std::size_t, typename...> friend class _Tuple_impl;
147 typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited;
148 typedef _Head_base<_Idx, _Head, std::is_empty<_Head>::value> _Base;
150 _Head& _M_head() { return _Base::_M_head(); }
151 const _Head& _M_head() const { return _Base::_M_head(); }
153 _Inherited& _M_tail() { return *this; }
154 const _Inherited& _M_tail() const { return *this; }
156 constexpr _Tuple_impl()
157 : _Inherited(), _Base() { }
160 constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail)
161 : _Inherited(__tail...), _Base(__head) { }
163 template<typename _UHead, typename... _UTail>
165 _Tuple_impl(_UHead&& __head, _UTail&&... __tail)
166 : _Inherited(std::forward<_UTail>(__tail)...),
167 _Base(std::forward<_UHead>(__head)) { }
169 constexpr _Tuple_impl(const _Tuple_impl&) = default;
171 _Tuple_impl(_Tuple_impl&& __in)
172 : _Inherited(std::move(__in._M_tail())),
173 _Base(std::forward<_Head>(__in._M_head())) { }
175 template<typename... _UElements>
176 _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in)
177 : _Inherited(__in._M_tail()), _Base(__in._M_head()) { }
179 template<typename _UHead, typename... _UTails>
180 _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in)
181 : _Inherited(std::move(__in._M_tail())),
182 _Base(std::forward<_UHead>(__in._M_head())) { }
185 operator=(const _Tuple_impl& __in)
187 _M_head() = __in._M_head();
188 _M_tail() = __in._M_tail();
193 operator=(_Tuple_impl&& __in)
195 _M_head() = std::forward<_Head>(__in._M_head());
196 _M_tail() = std::move(__in._M_tail());
200 template<typename... _UElements>
202 operator=(const _Tuple_impl<_Idx, _UElements...>& __in)
204 _M_head() = __in._M_head();
205 _M_tail() = __in._M_tail();
209 template<typename _UHead, typename... _UTails>
211 operator=(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in)
213 _M_head() = std::forward<_UHead>(__in._M_head());
214 _M_tail() = std::move(__in._M_tail());
220 _M_swap(_Tuple_impl& __in)
221 noexcept(noexcept(swap(std::declval<_Head&>(),
222 std::declval<_Head&>()))
223 && noexcept(__in._M_tail()._M_swap(__in._M_tail())))
226 swap(this->_M_head(), __in._M_head());
227 _Inherited::_M_swap(__in._M_tail());
232 template<typename... _Elements>
233 class tuple : public _Tuple_impl<0, _Elements...>
235 typedef _Tuple_impl<0, _Elements...> _Inherited;
242 constexpr tuple(const _Elements&... __elements)
243 : _Inherited(__elements...) { }
245 template<typename... _UElements, typename = typename
246 std::enable_if<sizeof...(_UElements)
247 == sizeof...(_Elements)>::type>
249 tuple(_UElements&&... __elements)
250 : _Inherited(std::forward<_UElements>(__elements)...) { }
252 constexpr tuple(const tuple&) = default;
255 : _Inherited(static_cast<_Inherited&&>(__in)) { }
257 template<typename... _UElements, typename = typename
258 std::enable_if<sizeof...(_UElements)
259 == sizeof...(_Elements)>::type>
260 tuple(const tuple<_UElements...>& __in)
261 : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in))
264 template<typename... _UElements, typename = typename
265 std::enable_if<sizeof...(_UElements)
266 == sizeof...(_Elements)>::type>
267 tuple(tuple<_UElements...>&& __in)
268 : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { }
271 operator=(const tuple& __in)
273 static_cast<_Inherited&>(*this) = __in;
278 operator=(tuple&& __in)
280 static_cast<_Inherited&>(*this) = std::move(__in);
284 template<typename... _UElements, typename = typename
285 std::enable_if<sizeof...(_UElements)
286 == sizeof...(_Elements)>::type>
288 operator=(const tuple<_UElements...>& __in)
290 static_cast<_Inherited&>(*this) = __in;
294 template<typename... _UElements, typename = typename
295 std::enable_if<sizeof...(_UElements)
296 == sizeof...(_Elements)>::type>
298 operator=(tuple<_UElements...>&& __in)
300 static_cast<_Inherited&>(*this) = std::move(__in);
306 noexcept(noexcept(__in._M_swap(__in)))
307 { _Inherited::_M_swap(__in); }
314 void swap(tuple&) noexcept { /* no-op */ }
317 /// tuple (2-element), with construction and assignment from a pair.
318 template<typename _T1, typename _T2>
319 class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2>
321 typedef _Tuple_impl<0, _T1, _T2> _Inherited;
328 constexpr tuple(const _T1& __a1, const _T2& __a2)
329 : _Inherited(__a1, __a2) { }
331 template<typename _U1, typename _U2>
333 tuple(_U1&& __a1, _U2&& __a2)
334 : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { }
336 constexpr tuple(const tuple&) = default;
339 : _Inherited(static_cast<_Inherited&&>(__in)) { }
341 template<typename _U1, typename _U2>
342 tuple(const tuple<_U1, _U2>& __in)
343 : _Inherited(static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { }
345 template<typename _U1, typename _U2>
346 tuple(tuple<_U1, _U2>&& __in)
347 : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { }
349 template<typename _U1, typename _U2>
350 tuple(const pair<_U1, _U2>& __in)
351 : _Inherited(__in.first, __in.second) { }
353 template<typename _U1, typename _U2>
354 tuple(pair<_U1, _U2>&& __in)
355 : _Inherited(std::forward<_U1>(__in.first),
356 std::forward<_U2>(__in.second)) { }
359 operator=(const tuple& __in)
361 static_cast<_Inherited&>(*this) = __in;
366 operator=(tuple&& __in)
367 // noexcept has to wait is_nothrow_move_assignable
369 static_cast<_Inherited&>(*this) = std::move(__in);
373 template<typename _U1, typename _U2>
375 operator=(const tuple<_U1, _U2>& __in)
377 static_cast<_Inherited&>(*this) = __in;
381 template<typename _U1, typename _U2>
383 operator=(tuple<_U1, _U2>&& __in)
385 static_cast<_Inherited&>(*this) = std::move(__in);
389 template<typename _U1, typename _U2>
391 operator=(const pair<_U1, _U2>& __in)
393 this->_M_head() = __in.first;
394 this->_M_tail()._M_head() = __in.second;
398 template<typename _U1, typename _U2>
400 operator=(pair<_U1, _U2>&& __in) noexcept
402 this->_M_head() = std::forward<_U1>(__in.first);
403 this->_M_tail()._M_head() = std::forward<_U2>(__in.second);
409 noexcept(noexcept(__in._M_swap(__in)))
410 { _Inherited::_M_swap(__in); }
413 /// tuple (1-element).
414 template<typename _T1>
415 class tuple<_T1> : public _Tuple_impl<0, _T1>
417 typedef _Tuple_impl<0, _T1> _Inherited;
424 constexpr tuple(const _T1& __a1)
425 : _Inherited(__a1) { }
427 template<typename _U1, typename = typename
428 std::enable_if<std::is_convertible<_U1, _T1>::value>::type>
431 : _Inherited(std::forward<_U1>(__a1)) { }
433 constexpr tuple(const tuple&) = default;
436 : _Inherited(static_cast<_Inherited&&>(__in)) { }
438 template<typename _U1>
439 tuple(const tuple<_U1>& __in)
440 : _Inherited(static_cast<const _Tuple_impl<0, _U1>&>(__in)) { }
442 template<typename _U1>
443 tuple(tuple<_U1>&& __in)
444 : _Inherited(static_cast<_Tuple_impl<0, _U1>&&>(__in)) { }
447 operator=(const tuple& __in)
449 static_cast<_Inherited&>(*this) = __in;
454 operator=(tuple&& __in)
456 static_cast<_Inherited&>(*this) = std::move(__in);
460 template<typename _U1>
462 operator=(const tuple<_U1>& __in)
464 static_cast<_Inherited&>(*this) = __in;
468 template<typename _U1>
470 operator=(tuple<_U1>&& __in)
472 static_cast<_Inherited&>(*this) = std::move(__in);
478 noexcept(noexcept(__in._M_swap(__in)))
479 { _Inherited::_M_swap(__in); }
483 /// Gives the type of the ith element of a given tuple type.
484 template<std::size_t __i, typename _Tp>
485 struct tuple_element;
488 * Recursive case for tuple_element: strip off the first element in
489 * the tuple and retrieve the (i-1)th element of the remaining tuple.
491 template<std::size_t __i, typename _Head, typename... _Tail>
492 struct tuple_element<__i, tuple<_Head, _Tail...> >
493 : tuple_element<__i - 1, tuple<_Tail...> > { };
496 * Basis case for tuple_element: The first element is the one we're seeking.
498 template<typename _Head, typename... _Tail>
499 struct tuple_element<0, tuple<_Head, _Tail...> >
504 /// Finds the size of a given tuple type.
505 template<typename _Tp>
509 template<typename... _Elements>
510 struct tuple_size<tuple<_Elements...> >
512 static const std::size_t value = sizeof...(_Elements);
515 template<typename... _Elements>
516 const std::size_t tuple_size<tuple<_Elements...> >::value;
518 template<std::size_t __i, typename _Head, typename... _Tail>
519 inline typename __add_ref<_Head>::type
520 __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t)
521 { return __t._M_head(); }
523 template<std::size_t __i, typename _Head, typename... _Tail>
524 inline typename __add_c_ref<_Head>::type
525 __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t)
526 { return __t._M_head(); }
528 // Return a reference (const reference, rvalue reference) to the ith element
529 // of a tuple. Any const or non-const ref elements are returned with their
531 template<std::size_t __i, typename... _Elements>
532 inline typename __add_ref<
533 typename tuple_element<__i, tuple<_Elements...>>::type
535 get(tuple<_Elements...>& __t) noexcept
536 { return __get_helper<__i>(__t); }
538 template<std::size_t __i, typename... _Elements>
539 inline typename __add_c_ref<
540 typename tuple_element<__i, tuple<_Elements...>>::type
542 get(const tuple<_Elements...>& __t) noexcept
543 { return __get_helper<__i>(__t); }
545 template<std::size_t __i, typename... _Elements>
546 inline typename __add_r_ref<
547 typename tuple_element<__i, tuple<_Elements...>>::type
549 get(tuple<_Elements...>&& __t) noexcept
550 { return std::forward<typename tuple_element<__i,
551 tuple<_Elements...>>::type&&>(get<__i>(__t)); }
553 // This class helps construct the various comparison operations on tuples
554 template<std::size_t __check_equal_size, std::size_t __i, std::size_t __j,
555 typename _Tp, typename _Up>
556 struct __tuple_compare;
558 template<std::size_t __i, std::size_t __j, typename _Tp, typename _Up>
559 struct __tuple_compare<0, __i, __j, _Tp, _Up>
561 static bool __eq(const _Tp& __t, const _Up& __u)
563 return (get<__i>(__t) == get<__i>(__u) &&
564 __tuple_compare<0, __i + 1, __j, _Tp, _Up>::__eq(__t, __u));
567 static bool __less(const _Tp& __t, const _Up& __u)
569 return ((get<__i>(__t) < get<__i>(__u))
570 || !(get<__i>(__u) < get<__i>(__t)) &&
571 __tuple_compare<0, __i + 1, __j, _Tp, _Up>::__less(__t, __u));
575 template<std::size_t __i, typename _Tp, typename _Up>
576 struct __tuple_compare<0, __i, __i, _Tp, _Up>
578 static bool __eq(const _Tp&, const _Up&)
581 static bool __less(const _Tp&, const _Up&)
585 template<typename... _TElements, typename... _UElements>
587 operator==(const tuple<_TElements...>& __t,
588 const tuple<_UElements...>& __u)
590 typedef tuple<_TElements...> _Tp;
591 typedef tuple<_UElements...> _Up;
592 return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Up>::value,
593 0, tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u));
596 template<typename... _TElements, typename... _UElements>
598 operator<(const tuple<_TElements...>& __t,
599 const tuple<_UElements...>& __u)
601 typedef tuple<_TElements...> _Tp;
602 typedef tuple<_UElements...> _Up;
603 return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Up>::value,
604 0, tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u));
607 template<typename... _TElements, typename... _UElements>
609 operator!=(const tuple<_TElements...>& __t,
610 const tuple<_UElements...>& __u)
611 { return !(__t == __u); }
613 template<typename... _TElements, typename... _UElements>
615 operator>(const tuple<_TElements...>& __t,
616 const tuple<_UElements...>& __u)
617 { return __u < __t; }
619 template<typename... _TElements, typename... _UElements>
621 operator<=(const tuple<_TElements...>& __t,
622 const tuple<_UElements...>& __u)
623 { return !(__u < __t); }
625 template<typename... _TElements, typename... _UElements>
627 operator>=(const tuple<_TElements...>& __t,
628 const tuple<_UElements...>& __u)
629 { return !(__t < __u); }
632 template<typename... _Elements>
633 inline tuple<typename __decay_and_strip<_Elements>::__type...>
634 make_tuple(_Elements&&... __args)
636 typedef tuple<typename __decay_and_strip<_Elements>::__type...>
638 return __result_type(std::forward<_Elements>(__args)...);
641 template<typename... _Elements>
642 inline tuple<_Elements&&...>
643 forward_as_tuple(_Elements&&... __args) noexcept
644 { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); }
646 template<std::size_t...> struct __index_holder { };
648 template<std::size_t __i, typename _IdxHolder, typename... _Elements>
649 struct __index_holder_impl;
651 template<std::size_t __i, std::size_t... _Indexes, typename _IdxHolder,
652 typename... _Elements>
653 struct __index_holder_impl<__i, __index_holder<_Indexes...>,
654 _IdxHolder, _Elements...>
656 typedef typename __index_holder_impl<__i + 1,
657 __index_holder<_Indexes..., __i>,
658 _Elements...>::type type;
661 template<std::size_t __i, std::size_t... _Indexes>
662 struct __index_holder_impl<__i, __index_holder<_Indexes...> >
663 { typedef __index_holder<_Indexes...> type; };
665 template<typename... _Elements>
666 struct __make_index_holder
667 : __index_holder_impl<0, __index_holder<>, _Elements...> { };
669 template<typename... _TElements, std::size_t... _TIdx,
670 typename... _UElements, std::size_t... _UIdx>
671 inline tuple<_TElements..., _UElements...>
672 __tuple_cat_helper(const tuple<_TElements...>& __t,
673 const __index_holder<_TIdx...>&,
674 const tuple<_UElements...>& __u,
675 const __index_holder<_UIdx...>&)
676 { return tuple<_TElements..., _UElements...>(get<_TIdx>(__t)...,
677 get<_UIdx>(__u)...); }
679 template<typename... _TElements, std::size_t... _TIdx,
680 typename... _UElements, std::size_t... _UIdx>
681 inline tuple<_TElements..., _UElements...>
682 __tuple_cat_helper(tuple<_TElements...>&& __t,
683 const __index_holder<_TIdx...>&,
684 const tuple<_UElements...>& __u,
685 const __index_holder<_UIdx...>&)
686 { return tuple<_TElements..., _UElements...>
687 (std::forward<_TElements>(get<_TIdx>(__t))..., get<_UIdx>(__u)...); }
689 template<typename... _TElements, std::size_t... _TIdx,
690 typename... _UElements, std::size_t... _UIdx>
691 inline tuple<_TElements..., _UElements...>
692 __tuple_cat_helper(const tuple<_TElements...>& __t,
693 const __index_holder<_TIdx...>&,
694 tuple<_UElements...>&& __u,
695 const __index_holder<_UIdx...>&)
696 { return tuple<_TElements..., _UElements...>
697 (get<_TIdx>(__t)..., std::forward<_UElements>(get<_UIdx>(__u))...); }
699 template<typename... _TElements, std::size_t... _TIdx,
700 typename... _UElements, std::size_t... _UIdx>
701 inline tuple<_TElements..., _UElements...>
702 __tuple_cat_helper(tuple<_TElements...>&& __t,
703 const __index_holder<_TIdx...>&,
704 tuple<_UElements...>&& __u,
705 const __index_holder<_UIdx...>&)
706 { return tuple<_TElements..., _UElements...>
707 (std::forward<_TElements>(get<_TIdx>(__t))...,
708 std::forward<_UElements>(get<_UIdx>(__u))...); }
710 template<typename... _TElements, typename... _UElements>
711 inline tuple<_TElements..., _UElements...>
712 tuple_cat(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u)
714 return __tuple_cat_helper(__t, typename
715 __make_index_holder<_TElements...>::type(),
717 __make_index_holder<_UElements...>::type());
720 template<typename... _TElements, typename... _UElements>
721 inline tuple<_TElements..., _UElements...>
722 tuple_cat(tuple<_TElements...>&& __t, const tuple<_UElements...>& __u)
724 return __tuple_cat_helper(std::move(__t), typename
725 __make_index_holder<_TElements...>::type(),
727 __make_index_holder<_UElements...>::type());
730 template<typename... _TElements, typename... _UElements>
731 inline tuple<_TElements..., _UElements...>
732 tuple_cat(const tuple<_TElements...>& __t, tuple<_UElements...>&& __u)
734 return __tuple_cat_helper(__t, typename
735 __make_index_holder<_TElements...>::type(),
736 std::move(__u), typename
737 __make_index_holder<_UElements...>::type());
740 template<typename... _TElements, typename... _UElements>
741 inline tuple<_TElements..., _UElements...>
742 tuple_cat(tuple<_TElements...>&& __t, tuple<_UElements...>&& __u)
744 return __tuple_cat_helper(std::move(__t), typename
745 __make_index_holder<_TElements...>::type(),
746 std::move(__u), typename
747 __make_index_holder<_UElements...>::type());
750 template<typename... _Elements>
751 inline tuple<_Elements&...>
752 tie(_Elements&... __args) noexcept
753 { return tuple<_Elements&...>(__args...); }
755 template<typename... _Elements>
757 swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
758 noexcept(noexcept(__x.swap(__y)))
761 // A class (and instance) which can be used in 'tie' when an element
762 // of a tuple is not required
763 struct _Swallow_assign
766 const _Swallow_assign&
767 operator=(const _Tp&) const
771 const _Swallow_assign ignore{};
774 * Stores a tuple of indices. Used by bind() to extract the elements
777 template<int... _Indexes>
780 typedef _Index_tuple<_Indexes..., sizeof...(_Indexes)> __next;
783 /// Builds an _Index_tuple<0, 1, 2, ..., _Num-1>.
784 template<std::size_t _Num>
785 struct _Build_index_tuple
787 typedef typename _Build_index_tuple<_Num-1>::__type::__next __type;
791 struct _Build_index_tuple<0>
793 typedef _Index_tuple<> __type;
797 template<class _T1, class _T2>
798 template<typename _Tp, typename... _Args>
801 __cons(tuple<_Args...>&& __tuple)
803 typedef typename _Build_index_tuple<sizeof...(_Args)>::__type
805 return __do_cons<_Tp>(std::move(__tuple), _Indexes());
808 template<class _T1, class _T2>
809 template<typename _Tp, typename... _Args, int... _Indexes>
812 __do_cons(tuple<_Args...>&& __tuple,
813 const _Index_tuple<_Indexes...>&)
814 { return _Tp(std::forward<_Args>(get<_Indexes>(__tuple))...); }
816 _GLIBCXX_END_NAMESPACE_VERSION
819 #endif // __GXX_EXPERIMENTAL_CXX0X__
821 #endif // _GLIBCXX_TUPLE