[PATCH] D66040: [Sema] Implement DR2386 for C++17 structured binding
Jeroen Van Antwerpen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 9 23:32:49 PDT 2019
Jeroen added a comment.
In the reproduction of https://bugs.llvm.org/show_bug.cgi?id=33236 there is explicit mentioning of `const T`. It would be nice if the test cases for this fix would also have coverage for that.
================
Comment at: clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:15
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}}
+void no_tuple_size_3() { auto [x, y] = Bad1(); } // ok, omitting value is valid after DR2386
----------------
In the reproduction of https://bugs.llvm.org/show_bug.cgi?id=33236 there is explicit mentioning of `const T`. It would be nice if the test cases for this fix would also have coverage for that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66040/new/
https://reviews.llvm.org/D66040
More information about the cfe-commits
mailing list