From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8811939874BF; Tue, 22 Sep 2020 06:48:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8811939874BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600757300; bh=f4nBxzjgn9V1qZXepdO2PEQxXuBPZM1O1YA7l91Rkoo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=f2sFvjNW26DUbiu/0pOBT2ldHfmVj7WQOgjRGCiNdW/42tmOavmk9Ai5E2yU/cZAs bbgUfR8mhYwXh13bMTUstKl3cFfHBz+mzZMsujpXFSdfvkUQ4B5FLn7AkhwcJsK0UC uke9udQDud3O3mLL/1F50UDQnmoUf/542pmx5NsQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/96803] std::tuple chooses wrong constructor for uses-allocator construction Date: Tue, 22 Sep 2020 06:48:20 +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: 10.2.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, 22 Sep 2020 06:48:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96803 --- Comment #4 from CVS Commits --- The releases/gcc-9 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:4be18e2f16bccad652c7deddf04284804d7be530 commit r9-8930-g4be18e2f16bccad652c7deddf04284804d7be530 Author: Jonathan Wakely Date: Wed Aug 26 19:32:30 2020 +0100 libstdc++: Use correct argument type for __use_alloc [PR 96803] The _Tuple_impl constructor for allocator-extended construction from a different tuple type uses the _Tuple_impl's own _Head type in the __use_alloc test. That is incorrect, because the argument tuple could have a different type. Using the wrong type might select the leading-allocator convention when it should use the trailing-allocator convention, or vice versa. libstdc++-v3/ChangeLog: PR libstdc++/96803 * include/std/tuple (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl&)): Replace parameter pack with a type parameter and a pack and pass the first type to __use_alloc. * testsuite/20_util/tuple/cons/96803.cc: New test. (cherry picked from commit 5494edae83ad33c769bd1ebc98f0c492453a6417)=