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>&&); // iff sizeof...(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> struct 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)));
189 "Attempted to default construct a reference element in a tuple");}
196 "Attempted to default construct a reference element in a tuple");}
203 "Attempted to default construct a reference element in a tuple");}
210 "Attempted to default construct a reference element in a tuple");}
238 "Attempted to uses-allocator construct a reference element in a tuple");}
245 "Attempted to uses-allocator construct a reference element in a tuple");}
401 __tuple_constructible<_Tuple, tuple<_Tp...> >::value
414 __tuple_constructible<_Tuple, tuple<_Tp...> >::value
429 __tuple_assignable<_Tuple, tuple<_Tp...> >::value,
470 class _LIBCPP_TEMPLATE_VIS tuple
487 : is_same<typename __uncvref<_Arg>::type, tuple> {};
504 tuple<_Args...>,
505 typename __make_tuple_types<tuple,
511 tuple<_Args...>,
512 typename __make_tuple_types<tuple,
518 typename __make_tuple_types<tuple, sizeof...(_Tp),
529 tuple<_Args...>,
530 typename __make_tuple_types<tuple,
536 typename __make_tuple_types<tuple, sizeof...(_Tp),
554 return __tuple_convertible<_Tuple, tuple>::value;
559 return __tuple_constructible<_Tuple, tuple>::value
560 && !__tuple_convertible<_Tuple, tuple>::value;
567 // This trait is used to disable the tuple-like constructor when
572 // Don't attempt the two checks below if the tuple we are given
573 // has the same type as this tuple.
574 is_same<typename __uncvref<_Tuple>::type, tuple>,
584 __tuple_convertible<_Tuple, tuple>,
592 __tuple_constructible<_Tuple, tuple>,
594 __lazy_not<__tuple_convertible<_Tuple, tuple>>
600 typename tuple_element<_Jp, tuple<_Up...> >::type& get(tuple<_Up...>&) _NOEXCEPT;
602 … const typename tuple_element<_Jp, tuple<_Up...> >::type& get(const tuple<_Up...>&) _NOEXCEPT;
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;
613 _LIBCPP_CONSTEXPR tuple()
616 tuple(tuple const&) = default;
617 tuple(tuple&&) = default;
626 tuple(_AllocArgT, _Alloc const& __a)
642tuple(const _Tp& ... __t) _NOEXCEPT_((__all<is_nothrow_copy_constructible<_Tp>::value...>::value))
644 typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
646 typename __make_tuple_types<tuple, 0>::type(),
660 …explicit tuple(const _Tp& ... __t) _NOEXCEPT_((__all<is_nothrow_copy_constructible<_Tp>::value...>…
662 typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
664 typename __make_tuple_types<tuple, 0>::type(),
678 tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
681 typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
683 typename __make_tuple_types<tuple, 0>::type(),
698 tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
701 typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
703 typename __make_tuple_types<tuple, 0>::type(),
724 tuple(_Up&&... __u)
728 typename __make_tuple_types<tuple, sizeof...(_Up)>::type,
730 typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type,
735 typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
737 typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
757 tuple(_Up&&... __u)
761 typename __make_tuple_types<tuple, sizeof...(_Up)>::type,
763 typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type,
768 typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
770 typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
784 tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
787 typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
789 typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
804 tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
807 typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
809 typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
823 tuple(_Tuple&& __t) _NOEXCEPT_((is_nothrow_constructible<_BaseT, _Tuple>::value))
838 tuple(_Tuple&& __t) _NOEXCEPT_((is_nothrow_constructible<_BaseT, _Tuple>::value))
851 tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
865 tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
872 tuple& operator=(typename conditional<_CanCopyAssign::value, tuple, __nat>::type const& __t)
880 tuple& operator=(typename conditional<_CanMoveAssign::value, tuple, __nat>::type&& __t)
890 __tuple_assignable<_Tuple, tuple>::value
894 tuple&
902 void swap(tuple& __t) _NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value)
907 class _LIBCPP_TEMPLATE_VIS tuple<>
911 _LIBCPP_CONSTEXPR tuple() _NOEXCEPT {}
914 tuple(allocator_arg_t, const _Alloc&) _NOEXCEPT {}
917 tuple(allocator_arg_t, const _Alloc&, const tuple&) _NOEXCEPT {}
920 tuple(array<_Up, 0>) _NOEXCEPT {}
923 tuple(allocator_arg_t, const _Alloc&, array<_Up, 0>) _NOEXCEPT {}
925 void swap(tuple&) _NOEXCEPT {}
931 // tuple-like constructors "correctly"
933 tuple(allocator_arg_t, const _Alloc&, tuple<_Args...> const&) -> tuple<_Args...>;
935 tuple(allocator_arg_t, const _Alloc&, tuple<_Args...>&&) -> tuple<_Args...>;
945 swap(tuple<_Tp...>& __t, tuple<_Tp...>& __u)
953 typename tuple_element<_Ip, tuple<_Tp...> >::type&
954 get(tuple<_Tp...>& __t) _NOEXCEPT
956 typedef typename tuple_element<_Ip, tuple<_Tp...> >::type type;
962 const typename tuple_element<_Ip, tuple<_Tp...> >::type&
963 get(const tuple<_Tp...>& __t) _NOEXCEPT
965 typedef typename tuple_element<_Ip, tuple<_Tp...> >::type type;
971 typename tuple_element<_Ip, tuple<_Tp...> >::type&&
972 get(tuple<_Tp...>&& __t) _NOEXCEPT
974 typedef typename tuple_element<_Ip, tuple<_Tp...> >::type type;
981 const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
982 get(const tuple<_Tp...>&& __t) _NOEXCEPT
984 typedef typename tuple_element<_Ip, tuple<_Tp...> >::type type;
1031 constexpr _T1& get(tuple<_Args...>& __tup) noexcept
1038 constexpr _T1 const& get(tuple<_Args...> const& __tup) noexcept
1045 constexpr _T1&& get(tuple<_Args...>&& __tup) noexcept
1052 constexpr _T1 const&& get(tuple<_Args...> const&& __tup) noexcept
1063 tuple<_Tp&...>
1066 return tuple<_Tp&...>(__t...);
1083 tuple<typename __unwrap_ref_decay<_Tp>::type...>
1086 return tuple<typename __unwrap_ref_decay<_Tp>::type...>(_VSTD::forward<_Tp>(__t)...);
1091 tuple<_Tp&&...>
1094 return tuple<_Tp&&...>(_VSTD::forward<_Tp>(__t)...);
1122 operator==(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1130 operator!=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1165 operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1173 operator>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1181 operator>=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1189 operator<=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1199 struct __tuple_cat_type<tuple<_Ttypes...>, __tuple_types<_Utypes...> >
1201 typedef tuple<_Ttypes..., _Utypes...> type;
1210 struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0>
1212 typedef typename __tuple_cat_type<tuple<_Types...>,
1218 struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0, _Tuple1, _Tuples...>
1221 tuple<_Types...>,
1233 : public __tuple_cat_return_1<tuple<>,
1242 typedef tuple<> type;
1246 tuple<>
1249 return tuple<>();
1256 struct __tuple_cat_return_ref_imp<tuple<_Types...>, __tuple_indices<_I0...>, _Tuple0>
1259 typedef tuple<_Types..., typename __apply_cv<_Tuple0,
1264 struct __tuple_cat_return_ref_imp<tuple<_Types...>, __tuple_indices<_I0...>,
1267 tuple<_Types..., typename __apply_cv<_Tuple0,
1278 : public __tuple_cat_return_ref_imp<tuple<>,
1289 struct __tuple_cat<tuple<_Types...>, __tuple_indices<_I0...>, __tuple_indices<_J0...> >
1293 typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&>::type
1294 operator()(tuple<_Types...> __t, _Tuple0&& __t0)
1302 typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&, _Tuple1&&, _Tuples&&...>::type
1303 operator()(tuple<_Types...> __t, _Tuple0&& __t0, _Tuple1&& __t1, _Tuples&& ...__tpls)
1308tuple<_Types..., typename __apply_cv<_Tuple0, typename tuple_element<_J0, _T0>::type>::type&&...>,
1326 return __tuple_cat<tuple<>, __tuple_indices<>,
1328 (tuple<>(), _VSTD::forward<_Tuple0>(__t0),
1333 struct _LIBCPP_TEMPLATE_VIS uses_allocator<tuple<_Tp...>, _Alloc>
1340 tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args,