[clang] [Clang][NFC] Add test for CWG2285 "Issues with structured bindings" (PR #126421)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 24 12:49:21 PST 2025
================
@@ -136,7 +136,7 @@ namespace MultiDeclarator {
namespace Template {
int n[3];
- // FIXME: There's no actual rule against this...
+ // Structured binding template is not allowed.
template<typename T> auto [a, b, c] = n; // expected-error {{decomposition declaration template not supported}}
----------------
cor3ntin wrote:
While we are there, can we change the diagnostic to `decomposition declaration cannot be a template` or something like that, not to give the impression it's a clang limitation?
https://github.com/llvm/llvm-project/pull/126421
More information about the cfe-commits
mailing list