2018-06-14 Jonathan Wakely <jwakely@redhat.com>
+ * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
+ Move back to <utility>.
+ * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
+ Restore to here.
+
P0935R0 Eradicating unnecessarily explicit default constructors
* include/backward/strstream (strstreambuf): Add non-explicit default
constructor.
"tuple index is in range");
};
-#if __cplusplus >= 201402L
-#define __cpp_lib_tuple_element_t 201402L
-
- template<size_t __i, typename _Tp>
- using tuple_element_t = typename tuple_element<__i, _Tp>::type;
-#endif
-
template<std::size_t __i, typename _Head, typename... _Tail>
constexpr _Head&
__get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type;
};
+#if __cplusplus >= 201402L
+// The standard says this macro and alias template should be in <tuple>
+// but we define them here, to be available when the partial specializations
+// of tuple_element<pair<T,U>> and tuple_element<array<T,N>> are defined.
+#define __cpp_lib_tuple_element_t 201402L
+
+ template<std::size_t __i, typename _Tp>
+ using tuple_element_t = typename tuple_element<__i, _Tp>::type;
+#endif
+
// Various functions which give std::pair a tuple-like interface.
/// Partial specialization for std::pair