From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3E8513857816; Tue, 12 Oct 2021 10:59:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E8513857816 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/101960] std::tuple with an array element is rejected as a named return type Date: Tue, 12 Oct 2021 10:59:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2021 10:59:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101960 --- Comment #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:00967465fe8093661a4d42356821eeb04170e09d commit r11-9116-g00967465fe8093661a4d42356821eeb04170e09d Author: Jonathan Wakely Date: Thu Aug 19 11:48:40 2021 +0100 libstdc++: Fix move construction of std::tuple with array elements [PR101960] An array member cannot be direct-initialized in a ctor-initializer-list, so use the base class' move constructor, which does the right thing for both arrays and non-arrays. This constructor could be defaulted, but that would make it trivial for some specializations, which would change the argument passing ABI. Do that for the versioned namespace only. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/101960 * include/std/tuple (_Tuple_impl(_Tuple_impl&&)): Use base class' move constructor. Define as defaulted for versioned namespace. * testsuite/20_util/tuple/cons/101960.cc: New test. (cherry picked from commit 0187e0d7360f327f88d8b2294668669306ae4630)=