Lines Matching refs:tuple
2 //===--------------------------- tuple ------------------------------------===//
15 tuple synopsis
21 class tuple {
23 constexpr tuple();
24 explicit tuple(const T&...); // constexpr in C++14
26 explicit tuple(U&&...); // constexpr in C++14
27 tuple(const tuple&) = default;
28 tuple(tuple&&) = default;
30 tuple(const tuple<U...>&); // constexpr in C++14
32 tuple(tuple<U...>&&); // constexpr in C++14
34 tuple(const pair<U1, U2>&); // iff sizeof...(T) == 2 // constexpr in C++14
36 tuple(pair<U1, U2>&&); // iff sizeof...(T) == 2 // constexpr in C++14
40 tuple(allocator_arg_t, const Alloc& a);
42 tuple(allocator_arg_t, const Alloc& a, const T&...);
44 tuple(allocator_arg_t, const Alloc& a, U&&...);
46 tuple(allocator_arg_t, const Alloc& a, const tuple&);
48 tuple(allocator_arg_t, const Alloc& a, tuple&&);
50 tuple(allocator_arg_t, const Alloc& a, const tuple<U...>&);
52 tuple(allocator_arg_t, const Alloc& a, tuple<U...>&&);
54 tuple(allocator_arg_t, const Alloc& a, const pair<U1, U2>&);
56 tuple(allocator_arg_t, const Alloc& a, pair<U1, U2>&&);
58 tuple& operator=(const tuple&);
59 tuple&
60 operator=(tuple&&) noexcept(AND(is_nothrow_move_assignable<T>::value ...));
62 tuple& operator=(const tuple<U...>&);
64 tuple& operator=(tuple<U...>&&);
66 tuple& operator=(const pair<U1, U2>&); // iff sizeof...(T) == 2
68 tuple& operator=(pair<U1, U2>&&); //iffsizeof...(T) == 2
70 void swap(tuple&) noexcept(AND(swap(declval<T&>(), declval<T&>())...));
75 template <class... T> tuple<V...> make_tuple(T&&...); // constexpr in C++14
76 template <class... T> tuple<ATypes...> forward_as_tuple(T&&...) noexcept; // constexpr in C++14
77 template <class... T> tuple<T&...> tie(T&...) noexcept; // constexpr in C++14
78 template <class... Tuples> tuple<CTypes...> tuple_cat(Tuples&&... tpls); // constexpr in C++14
80 // [tuple.apply], calling a function with a tuple of arguments:
86 // 20.4.1.4, tuple helper classes:
88 template <class... T> class tuple_size<tuple<T...>>;
92 template <size_t I, class... T> class tuple_element<I, tuple<T...>>;
98 typename tuple_element<I, tuple<T...>>::type&
99 get(tuple<T...>&) noexcept; // constexpr in C++14
101 const typename tuple_element<I, tuple<T...>>::type&
102 get(const tuple<T...>&) noexcept; // constexpr in C++14
104 typename tuple_element<I, tuple<T...>>::type&&
105 get(tuple<T...>&&) noexcept; // constexpr in C++14
107 const typename tuple_element<I, tuple<T...>>::type&&
108 get(const tuple<T...>&&) noexcept; // constexpr in C++14
111 constexpr T1& get(tuple<T...>&) noexcept; // C++14
113 constexpr const T1& get(const tuple<T...>&) noexcept; // C++14
115 constexpr T1&& get(tuple<T...>&&) noexcept; // C++14
117 constexpr const T1&& get(const tuple<T...>&&) noexcept; // C++14
120 template<class... T, class... U> bool operator==(const tuple<T...>&, const tuple<U...>&); // conste…
121 template<class... T, class... U> bool operator<(const tuple<T...>&, const tuple<U...>&); // conste…
122 template<class... T, class... U> bool operator!=(const tuple<T...>&, const tuple<U...>&); // conste…
123 template<class... T, class... U> bool operator>(const tuple<T...>&, const tuple<U...>&); // conste…
124 template<class... T, class... U> bool operator<=(const tuple<T...>&, const tuple<U...>&); // conste…
125 template<class... T, class... U> bool operator>=(const tuple<T...>&, const tuple<U...>&); // conste…
128 struct uses_allocator<tuple<Types...>, Alloc>;
132 swap(tuple<Types...>& x, tuple<Types...>& y) noexcept(noexcept(x.swap(y)));
193 "Attempted to default construct a reference element in a tuple");}
200 "Attempted to default construct a reference element in a tuple");}
207 "Attempted to default construct a reference element in a tuple");}
214 "Attempted to default construct a reference element in a tuple");}
228 "Attempted to construct a reference element in a tuple with an rvalue");}
235 "Attempted to construct a reference element in a tuple with an rvalue");}
242 "Attempted to uses-allocator construct a reference element in a tuple");}
249 "Attempted to uses-allocator construct a reference element in a tuple");}
405 __tuple_constructible<_Tuple, tuple<_Tp...> >::value
418 __tuple_constructible<_Tuple, tuple<_Tp...> >::value
433 __tuple_assignable<_Tuple, tuple<_Tp...> >::value,
474 class _LIBCPP_TEMPLATE_VIS tuple
491 : is_same<typename __uncvref<_Arg>::type, tuple> {};
508 tuple<_Args...>,
509 typename __make_tuple_types<tuple,
515 tuple<_Args...>,
516 typename __make_tuple_types<tuple,
522 typename __make_tuple_types<tuple, sizeof...(_Tp),
533 tuple<_Args...>,
534 typename __make_tuple_types<tuple,
540 typename __make_tuple_types<tuple, sizeof...(_Tp),
558 return __tuple_convertible<_Tuple, tuple>::value;
563 return __tuple_constructible<_Tuple, tuple>::value
564 && !__tuple_convertible<_Tuple, tuple>::value;
571 // This trait is used to disable the tuple-like constructor when
576 // Don't attempt the two checks below if the tuple we are given
577 // has the same type as this tuple.
578 is_same<typename __uncvref<_Tuple>::type, tuple>,
588 __tuple_convertible<_Tuple, tuple>,
596 __tuple_constructible<_Tuple, tuple>,
598 __lazy_not<__tuple_convertible<_Tuple, tuple>>
604 typename tuple_element<_Jp, tuple<_Up...> >::type& get(tuple<_Up...>&) _NOEXCEPT;
606 … const typename tuple_element<_Jp, tuple<_Up...> >::type& get(const tuple<_Up...>&) _NOEXCEPT;
608 typename tuple_element<_Jp, tuple<_Up...> >::type&& get(tuple<_Up...>&&) _NOEXCEPT;
610 … const typename tuple_element<_Jp, tuple<_Up...> >::type&& get(const tuple<_Up...>&&) _NOEXCEPT;
617 _LIBCPP_CONSTEXPR tuple()
620 tuple(tuple const&) = default;
621 tuple(tuple&&) = default;
630 tuple(_AllocArgT, _Alloc const& __a)
646 … tuple(const _Tp& ... __t) _NOEXCEPT_((__all<is_nothrow_copy_constructible<_Tp>::value...>::value))
648 typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
650 typename __make_tuple_types<tuple, 0>::type(),
664 …explicit tuple(const _Tp& ... __t) _NOEXCEPT_((__all<is_nothrow_copy_constructible<_Tp>::value...>…
666 typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
668 typename __make_tuple_types<tuple, 0>::type(),
682 tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
685 typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
687 typename __make_tuple_types<tuple, 0>::type(),
702 tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
705 typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
707 typename __make_tuple_types<tuple, 0>::type(),
728 tuple(_Up&&... __u)
732 typename __make_tuple_types<tuple, sizeof...(_Up)>::type,
734 typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type,
739 typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
741 typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
761 tuple(_Up&&... __u)
765 typename __make_tuple_types<tuple, sizeof...(_Up)>::type,
767 typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type,
772 typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
774 typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
788 tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
791 typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
793 typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
808 tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
811 typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
813 typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
827 tuple(_Tuple&& __t) _NOEXCEPT_((is_nothrow_constructible<base, _Tuple>::value))
842 tuple(_Tuple&& __t) _NOEXCEPT_((is_nothrow_constructible<base, _Tuple>::value))
855 tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
869 tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
876 tuple& operator=(typename conditional<_CanCopyAssign::value, tuple, __nat>::type const& __t)
884 tuple& operator=(typename conditional<_CanMoveAssign::value, tuple, __nat>::type&& __t)
894 __tuple_assignable<_Tuple, tuple>::value
898 tuple&
906 void swap(tuple& __t) _NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value)
911 class _LIBCPP_TEMPLATE_VIS tuple<>
915 _LIBCPP_CONSTEXPR tuple() _NOEXCEPT {}
918 tuple(allocator_arg_t, const _Alloc&) _NOEXCEPT {}
921 tuple(allocator_arg_t, const _Alloc&, const tuple&) _NOEXCEPT {}
924 tuple(array<_Up, 0>) _NOEXCEPT {}
927 tuple(allocator_arg_t, const _Alloc&, array<_Up, 0>) _NOEXCEPT {}
929 void swap(tuple&) _NOEXCEPT {}
939 swap(tuple<_Tp...>& __t, tuple<_Tp...>& __u)
947 typename tuple_element<_Ip, tuple<_Tp...> >::type&
948 get(tuple<_Tp...>& __t) _NOEXCEPT
950 typedef typename tuple_element<_Ip, tuple<_Tp...> >::type type;
956 const typename tuple_element<_Ip, tuple<_Tp...> >::type&
957 get(const tuple<_Tp...>& __t) _NOEXCEPT
959 typedef typename tuple_element<_Ip, tuple<_Tp...> >::type type;
965 typename tuple_element<_Ip, tuple<_Tp...> >::type&&
966 get(tuple<_Tp...>&& __t) _NOEXCEPT
968 typedef typename tuple_element<_Ip, tuple<_Tp...> >::type type;
975 const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
976 get(const tuple<_Tp...>&& __t) _NOEXCEPT
978 typedef typename tuple_element<_Ip, tuple<_Tp...> >::type type;
1025 constexpr _T1& get(tuple<_Args...>& __tup) noexcept
1032 constexpr _T1 const& get(tuple<_Args...> const& __tup) noexcept
1039 constexpr _T1&& get(tuple<_Args...>&& __tup) noexcept
1046 constexpr _T1 const&& get(tuple<_Args...> const&& __tup) noexcept
1057 tuple<_Tp&...>
1060 return tuple<_Tp&...>(__t...);
1095 tuple<typename __make_tuple_return<_Tp>::type...>
1098 return tuple<typename __make_tuple_return<_Tp>::type...>(_VSTD::forward<_Tp>(__t)...);
1103 tuple<_Tp&&...>
1106 return tuple<_Tp&&...>(_VSTD::forward<_Tp>(__t)...);
1134 operator==(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1142 operator!=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1177 operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1185 operator>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1193 operator>=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1201 operator<=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1211 struct __tuple_cat_type<tuple<_Ttypes...>, __tuple_types<_Utypes...> >
1213 typedef tuple<_Ttypes..., _Utypes...> type;
1222 struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0>
1224 typedef typename __tuple_cat_type<tuple<_Types...>,
1230 struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0, _Tuple1, _Tuples...>
1233 tuple<_Types...>,
1245 : public __tuple_cat_return_1<tuple<>,
1254 typedef tuple<> type;
1258 tuple<>
1261 return tuple<>();
1268 struct __tuple_cat_return_ref_imp<tuple<_Types...>, __tuple_indices<_I0...>, _Tuple0>
1271 typedef tuple<_Types..., typename __apply_cv<_Tuple0,
1276 struct __tuple_cat_return_ref_imp<tuple<_Types...>, __tuple_indices<_I0...>,
1279 tuple<_Types..., typename __apply_cv<_Tuple0,
1290 : public __tuple_cat_return_ref_imp<tuple<>,
1301 struct __tuple_cat<tuple<_Types...>, __tuple_indices<_I0...>, __tuple_indices<_J0...> >
1305 typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&>::type
1306 operator()(tuple<_Types...> __t, _Tuple0&& __t0)
1314 typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&, _Tuple1&&, _Tuples&&...>::type
1315 operator()(tuple<_Types...> __t, _Tuple0&& __t0, _Tuple1&& __t1, _Tuples&& ...__tpls)
1320 … tuple<_Types..., typename __apply_cv<_Tuple0, typename tuple_element<_J0, _T0>::type>::type&&...>,
1338 return __tuple_cat<tuple<>, __tuple_indices<>,
1340 (tuple<>(), _VSTD::forward<_Tuple0>(__t0),
1345 struct _LIBCPP_TEMPLATE_VIS uses_allocator<tuple<_Tp...>, _Alloc>
1355 tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args,