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++/96416] [DR 3545] to_address() is broken by static_assert in pointer_traits
Date: Fri, 26 Nov 2021 17:46:00 +0000	[thread overview]
Message-ID: <bug-96416-4-GM8svM3uMK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96416-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:8d3391d64799d490117ad48432a9ad2cf38b0091

commit r11-9317-g8d3391d64799d490117ad48432a9ad2cf38b0091
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Nov 25 23:29:08 2021 +0000

    libstdc++: Make std::pointer_traits SFINAE-friendly [PR96416]

    This is a simplified version of r12-5532 for the release branches.  It
    still removes the problematic static_assert, but rather than making
    std::pointer_traits completely empty when the element_type can't be
    deduced, it just disables element_type and pointer_to. Additionally, the
    pointer_to member is not completely absent when element_type is cv void,
    it just has an unusable signature.

    This is sufficient to avoid errors outside the immediate context when
    trying to use std::to_address.

    libstdc++-v3/ChangeLog:

            PR libstdc++/96416
            * include/bits/ptr_traits.h (pointer_traits): Remove
            static_assert checking for valid element_type.
            (pointer_traits::element_type, pointer_traits::pointer_to):
            Do not define when element type cannot be deduced.
            * testsuite/20_util/pointer_traits/lwg3545.cc: New test.
            * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line.
            * testsuite/20_util/to_address/lwg3545.cc: New test.

    (cherry picked from commit b8018e5c5ec0e9b6948182f13fba47c67b758d8a)

  parent reply	other threads:[~2021-11-26 17:46 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02  4:17 [Bug libstdc++/96416] New: address_of() " whatwasthataddress at gmail dot com
2020-08-03 12:58 ` [Bug libstdc++/96416] " redi at gcc dot gnu.org
2020-08-03 15:34 ` whatwasthataddress at gmail dot com
2020-08-03 15:38 ` redi at gcc dot gnu.org
2020-11-11 17:46 ` redi at gcc dot gnu.org
2020-11-11 18:52 ` redi at gcc dot gnu.org
2020-11-11 19:10 ` redi at gcc dot gnu.org
2020-11-11 20:05 ` glenjofe at gmail dot com
2020-11-11 20:40 ` redi at gcc dot gnu.org
2020-11-11 20:41 ` redi at gcc dot gnu.org
2021-03-26 14:19 ` dangelog at gmail dot com
2021-03-26 14:45 ` dangelog at gmail dot com
2021-03-26 23:44 ` glenjofe at gmail dot com
2021-03-27  0:48 ` [Bug libstdc++/96416] to_address() " redi at gcc dot gnu.org
2021-03-27  1:41 ` arthur.j.odwyer at gmail dot com
2021-03-27 16:53 ` dangelog at gmail dot com
2021-03-27 19:46 ` redi at gcc dot gnu.org
2021-03-29  3:08 ` glenjofe at gmail dot com
2021-04-20 20:11 ` redi at gcc dot gnu.org
2021-04-21  8:45 ` dangelog at gmail dot com
2021-08-05 22:55 ` gcc-bugs at marehr dot dialup.fu-berlin.de
2021-09-28 14:00 ` [Bug libstdc++/96416] [DR 3545] " redi at gcc dot gnu.org
2021-11-25 23:12 ` cvs-commit at gcc dot gnu.org
2021-11-26 17:46 ` cvs-commit at gcc dot gnu.org [this message]
2021-11-26 17:52 ` redi at gcc dot gnu.org
2021-12-09  1:24 ` whatwasthataddress at gmail dot com
2022-06-28 10:41 ` jakub at gcc dot gnu.org
2023-07-07  9:00 ` rguenth 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-96416-4-GM8svM3uMK@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).