From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CFC00385803A; Tue, 18 Jan 2022 16:32:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CFC00385803A From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/101124] [12 Regression] pair(0, 0) was intended to be deprecated, but is rejected now Date: Tue, 18 Jan 2022 16:32:14 +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: 12.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: P1 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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, 18 Jan 2022 16:32:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101124 --- Comment #2 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:302343d8dd30e34516f74a61ec758d80a6c4d1db commit r12-6691-g302343d8dd30e34516f74a61ec758d80a6c4d1db Author: Jonathan Wakely Date: Tue Jan 18 15:10:06 2022 +0000 libstdc++: Fix ambiguous std::pair constructors [PR101124] The deprecated non-standard std::pair constructors that allow constructing std::pair from an rvalue and a literal zero where not sufficiently constrained. They were viable when constructing std::pair, and that case should work fine using the standard constructors. Replace the constraints on the non-standard constructors so they are only viable in cases that should actually be ill-formed according to the standard. Also rename __null_ptr_constant to __zero_as_null_pointer_constant so it matches the name of the -Wzero-as-null-pointer-constant warning. Also make the text of the deprecated warning describe the problem in more detail. libstdc++-v3/ChangeLog: PR libstdc++/101124 * include/bits/stl_pair.h (pair): Adjust constraints on deprecated constructors accepting literal zero as null pointer constant. Improve wording of deprecated attribute. * testsuite/20_util/pair/cons/99957.cc: Check that deprecated constructors do not cause ambiguities for copyable types.=