https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81888
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Dec 15 22:07:23 2017 New Revision: 255719 URL: https://gcc.gnu.org/viewcvs?rev=255719&root=gcc&view=rev Log: Backported from mainline 2017-11-27 Jakub Jelinek <ja...@redhat.com> 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. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1z/decomp31.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/parser.c branches/gcc-7-branch/gcc/testsuite/ChangeLog branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1z/decomp30.C