re PR c++/81888 (Structured bindings stopped working)
PR c++/81888 * parser.c (cp_parser_decomposition_declaration): Reject just BRACE_ENCLOSED_INITIALIZER_P initializers with nelts != 1 rather than all such CONSTRUCTORs, and only if is_direct_init is true. * g++.dg/cpp1z/decomp30.C: Add a test for structured binding with = {} and = { a, a } initializers. * g++.dg/cpp1z/decomp31.C: New test. From-SVN: r255180
Showing
- gcc/cp/ChangeLog 7 additions, 0 deletionsgcc/cp/ChangeLog
- gcc/cp/parser.c 2 additions, 1 deletiongcc/cp/parser.c
- gcc/testsuite/ChangeLog 7 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/g++.dg/cpp1z/decomp30.C 2 additions, 0 deletionsgcc/testsuite/g++.dg/cpp1z/decomp30.C
- gcc/testsuite/g++.dg/cpp1z/decomp31.C 18 additions, 0 deletionsgcc/testsuite/g++.dg/cpp1z/decomp31.C
Loading
Please register or sign in to comment