================ @@ -0,0 +1,182 @@ +// RUN: %clang_cc1 %s -std=c++2c -fsyntax-only -verify +// RUN: %clang_cc1 %s -std=c++2c -fsyntax-only -verify -fexperimental-new-constant-interpreter + + +struct S0 {}; +struct S1 {int a;}; +struct S2 {int a; int b;}; +struct S3 {double a; int b; int c;}; ---------------- AaronBallman wrote:
Test with bit-fields? Test with unnamed bit-field? Test with an anonymous union member? Test with a flexible array member? Test where the structure being decomposed as a `static_assert` declaration in it (which wouldn't be a member as far as decomposition is concerned)? What about a monstrosity like: ``` struct S { int x; int y; static_assert(__builtin_structured_binding_size(S) == 2); // ? int z; static_assert(__builtin_structured_binding_size(S) == 3); }; ``` https://github.com/llvm/llvm-project/pull/131515 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits