summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-12-08 03:24:55 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-12-08 03:24:55 +0000
commit208732e9545bf4b50095d4c9a7836512c366853c (patch)
treee52082bbdc9ab0799fe7478d9ebc6ec2bcb02cee /clang/test
parent41217616a8ad0d7f1c35ba121a5fb2af9139c106 (diff)
downloadbcm5719-llvm-208732e9545bf4b50095d4c9a7836512c366853c.tar.gz
bcm5719-llvm-208732e9545bf4b50095d4c9a7836512c366853c.zip
[c++1z] P0490R0, NB comment GB 20: if std::tuple_size<T> is complete, use the
tuple-like interpretation of decomposition declaration even if there is no ::value member. We already did this, anticipating this resolution, just update comments and tweak a testcase. llvm-svn: 289021
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp b/clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp
index e4a7a6c4f98..b7092e3af02 100644
--- a/clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp
+++ b/clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp
@@ -10,7 +10,7 @@ void no_tuple_size_1() { auto [x, y] = A(); } // ok, decompose elementwise
namespace std { template<typename T> struct tuple_size; }
void no_tuple_size_2() { auto [x, y] = A(); } // ok, decompose elementwise
-struct Bad1 {};
+struct Bad1 { int a, b; };
template<> struct std::tuple_size<Bad1> {};
void no_tuple_size_3() { auto [x, y] = Bad1(); } // expected-error {{cannot decompose this type; 'std::tuple_size<Bad1>::value' is not a valid integral constant expression}}
OpenPOWER on IntegriCloud