public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/101124] [12 Regression] pair<T*, int>(0, 0) was intended to be deprecated, but is rejected now
Date: Tue, 18 Jan 2022 16:32:14 +0000	[thread overview]
Message-ID: <bug-101124-4-tnLCsjgIjw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101124-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101124

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:302343d8dd30e34516f74a61ec758d80a6c4d1db

commit r12-6691-g302343d8dd30e34516f74a61ec758d80a6c4d1db
Author: Jonathan Wakely <jwakely@redhat.com>
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<move-only-type, pointer-type> from an rvalue and
    a literal zero where not sufficiently constrained. They were viable when
    constructing std::pair<copyable-type, pointer-type>, 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.

  parent reply	other threads:[~2022-01-18 16:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 13:33 [Bug libstdc++/101124] New: " redi at gcc dot gnu.org
2021-06-21  6:15 ` [Bug libstdc++/101124] " rguenth at gcc dot gnu.org
2021-09-25 20:08 ` redi at gcc dot gnu.org
2022-01-17 14:26 ` rguenth at gcc dot gnu.org
2022-01-18 11:11 ` redi at gcc dot gnu.org
2022-01-18 16:32 ` cvs-commit at gcc dot gnu.org [this message]
2022-01-18 16:37 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-101124-4-tnLCsjgIjw@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).