diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2014-03-03 06:18:11 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2014-03-03 06:18:11 +0000 |
commit | 05c8dad23000f344763694d346e978ccaea07713 (patch) | |
tree | 383569ad118308da6fe15c3f900974ff68f3b94f /libcxx/test/utilities/tuple/tuple.tuple | |
parent | 06965c1fd0fc9994917c569eadc8c17c42d4f0b9 (diff) | |
download | bcm5719-llvm-05c8dad23000f344763694d346e978ccaea07713.tar.gz bcm5719-llvm-05c8dad23000f344763694d346e978ccaea07713.zip |
Implement LWG Paper n3887: Consistent Metafunction Aliases. This adds std::tuple_element_t<> as an alias for tuple_element<>::type. Clean up the synopsis for tuple_element in <utility> as well.
llvm-svn: 202673
Diffstat (limited to 'libcxx/test/utilities/tuple/tuple.tuple')
-rw-r--r-- | libcxx/test/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libcxx/test/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp b/libcxx/test/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp index 7b1ff8bb183..f3f8f2b109d 100644 --- a/libcxx/test/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp +++ b/libcxx/test/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp @@ -28,7 +28,14 @@ void test() static_assert((std::is_same<typename std::tuple_element<N, const T>::type, const U>::value), ""); static_assert((std::is_same<typename std::tuple_element<N, volatile T>::type, volatile U>::value), ""); static_assert((std::is_same<typename std::tuple_element<N, const volatile T>::type, const volatile U>::value), ""); +#if _LIBCPP_STD_VER > 11 + static_assert((std::is_same<typename std::tuple_element_t<N, T>, U>::value), ""); + static_assert((std::is_same<typename std::tuple_element_t<N, const T>, const U>::value), ""); + static_assert((std::is_same<typename std::tuple_element_t<N, volatile T>, volatile U>::value), ""); + static_assert((std::is_same<typename std::tuple_element_t<N, const volatile T>, const volatile U>::value), ""); +#endif } + int main() { test<std::tuple<int>, 0, int>(); |