summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2019-10-28 18:03:59 -0700
committerDavid Blaikie <dblaikie@gmail.com>2019-10-28 18:04:41 -0700
commite658b3eb9728eb33154233ce09fca39f89d71840 (patch)
treeb14913a6e33d57cfcfeebdff783075c5f03a38d7 /libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp
parent8530f294f59a36e2188e2198275490e1d6616e7f (diff)
downloadbcm5719-llvm-e658b3eb9728eb33154233ce09fca39f89d71840.tar.gz
bcm5719-llvm-e658b3eb9728eb33154233ce09fca39f89d71840.zip
PR43764: Qualify a couple of calls to forward_as_tuple to be ADL-resilient.
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.cpp16
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;
}
OpenPOWER on IntegriCloud