diff options
Diffstat (limited to 'libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp')
-rw-r--r-- | libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp index b663a4801fe..2fabeb0a577 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp @@ -23,6 +23,14 @@ #include "test_macros.h" #include "MoveOnly.h" +namespace NS { +struct Namespaced { + int i; +}; +template<typename ...Ts> +void forward_as_tuple(Ts...) = delete; +} + int main(int, char**) { { @@ -254,5 +262,13 @@ int main(int, char**) int, const int, int&, const int&>); ((void)r); } + { + std::tuple<NS::Namespaced> t1({1}); + std::tuple<NS::Namespaced> t = std::tuple_cat(t1); + std::tuple<NS::Namespaced, NS::Namespaced> t2 = + std::tuple_cat(t1, t1); + assert(std::get<0>(t).i == 1); + assert(std::get<0>(t2).i == 1); + } return 0; } |