diff options
author | 2019-06-17 22:18:29 +0000 | |
---|---|---|
committer | 2019-06-17 22:18:29 +0000 | |
commit | 504b10ec5101b237e4c07e1f2de4b6c48138181e (patch) | |
tree | 979c9ce8ab11efd05e4413305758dc5d6bc76ab4 /lib/libcxx/include/tuple | |
parent | A bit more KNF no binary change (diff) | |
download | wireguard-openbsd-504b10ec5101b237e4c07e1f2de4b6c48138181e.tar.xz wireguard-openbsd-504b10ec5101b237e4c07e1f2de4b6c48138181e.zip |
Import libc++ 8.0.0.
Diffstat (limited to 'lib/libcxx/include/tuple')
-rw-r--r-- | lib/libcxx/include/tuple | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/lib/libcxx/include/tuple b/lib/libcxx/include/tuple index b3a17e7b735..4cc69030b9a 100644 --- a/lib/libcxx/include/tuple +++ b/lib/libcxx/include/tuple @@ -65,7 +65,7 @@ public: template <class U1, class U2> tuple& operator=(const pair<U1, U2>&); // iff sizeof...(T) == 2 template <class U1, class U2> - tuple& operator=(pair<U1, U2>&&); //iffsizeof...(T) == 2 + tuple& operator=(pair<U1, U2>&&); // iff sizeof...(T) == 2 void swap(tuple&) noexcept(AND(swap(declval<T&>(), declval<T&>())...)); }; @@ -84,8 +84,8 @@ template <class T, class Tuple> constexpr T make_from_tuple(Tuple&& t); // C++17 // 20.4.1.4, tuple helper classes: -template <class T> class tuple_size; // undefined -template <class... T> class tuple_size<tuple<T...>>; +template <class T> struct tuple_size; // undefined +template <class... T> struct tuple_size<tuple<T...>>; template <class T> inline constexpr size_t tuple_size_v = tuple_size<T>::value; // C++17 template <size_t I, class T> class tuple_element; // undefined @@ -141,6 +141,7 @@ template <class... Types> #include <type_traits> #include <__functional_base> #include <utility> +#include <version> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -1077,30 +1078,12 @@ namespace { _LIBCPP_INLINE_VAR constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>(); } -template <class _Tp> -struct __make_tuple_return_impl -{ - typedef _Tp type; -}; - -template <class _Tp> -struct __make_tuple_return_impl<reference_wrapper<_Tp> > -{ - typedef _Tp& type; -}; - -template <class _Tp> -struct __make_tuple_return -{ - typedef typename __make_tuple_return_impl<typename decay<_Tp>::type>::type type; -}; - template <class... _Tp> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 -tuple<typename __make_tuple_return<_Tp>::type...> +tuple<typename __unwrap_ref_decay<_Tp>::type...> make_tuple(_Tp&&... __t) { - return tuple<typename __make_tuple_return<_Tp>::type...>(_VSTD::forward<_Tp>(__t)...); + return tuple<typename __unwrap_ref_decay<_Tp>::type...>(_VSTD::forward<_Tp>(__t)...); } template <class... _Tp> |