From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DB2A33857438; Tue, 12 Oct 2021 16:24:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB2A33857438 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 16:24:04 +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 16:24:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101960 --- Comment #8 from CVS Commits --- The releases/gcc-11 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:e748216c237cff2915390e9653de2db63b2161ac commit r11-9121-ge748216c237cff2915390e9653de2db63b2161ac Author: Jonathan Wakely Date: Tue Oct 12 15:09:50 2021 +0100 libstdc++: Fix move construction of std::tuple with array elements [PR101960] The r12-3022 commit only fixed the case where an array is the last element of the tuple. This fixes the other cases too. We can just define the move constructor as defaulted, which does the right thing. Changing the move constructor to be trivial would be an ABI break, but since the last base class still has a non-trivial move constructor, defining the derived ones as defaulted doesn't change anything. libstdc++-v3/ChangeLog: PR libstdc++/101960 * include/std/tuple (_Tuple_impl(_Tuple_impl&&)): Define as defauled. * testsuite/20_util/tuple/cons/101960.cc: Check tuples with array elements before the last element. (cherry picked from commit 7481021364e75ba583972e15ed421a53988368ea)=