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++/100863] 23_containers/unordered_{map,set}/allocator/default_init.cc still fail at runtime even after r12-1153
Date: Tue, 12 Oct 2021 19:41:34 +0000	[thread overview]
Message-ID: <bug-100863-4-irmgivG1bi@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100863-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 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:10c0df1048fdb6404328d4966a3737d4f784c48f

commit r11-9140-g10c0df1048fdb6404328d4966a3737d4f784c48f
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jul 20 15:20:41 2021 +0100

    libstdc++: fix is_default_constructible for hash containers [PR 100863]

    The recent change to _Hashtable_ebo_helper for this PR broke the
    is_default_constructible trait for a hash container with a non-default
    constructible allocator. That happens because the constructor needs to
    be user-provided in order to initialize the member, and so is not
    defined as deleted when the type is not default constructible.

    By making _Hashtable derive from _Enable_special_members we can ensure
    that the default constructor for the std::unordered_xxx containers is
    deleted when it would be ill-formed. This makes the trait give the
    correct answer.

    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

    libstdc++-v3/ChangeLog:

            PR libstdc++/100863
            * include/bits/hashtable.h (_Hashtable): Conditionally delete
            default constructor by deriving from _Enable_special_members.
            * testsuite/23_containers/unordered_map/cons/default.cc: New test.
            * testsuite/23_containers/unordered_set/cons/default.cc: New test.

    (cherry picked from commit 89ec3b67dbe856a447d068b053bc19559f136f43)

  parent reply	other threads:[~2021-10-12 19:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 20:30 [Bug libstdc++/100863] New: " ppalka at gcc dot gnu.org
2021-06-02  2:57 ` [Bug libstdc++/100863] " ppalka at gcc dot gnu.org
2021-06-02  9:35 ` redi at gcc dot gnu.org
2021-06-02 10:50 ` redi at gcc dot gnu.org
2021-06-02 12:33 ` cvs-commit at gcc dot gnu.org
2021-06-02 12:59 ` redi at gcc dot gnu.org
2021-06-02 13:00 ` redi at gcc dot gnu.org
2021-07-19 11:47 ` redi at gcc dot gnu.org
2021-07-20 15:23 ` cvs-commit at gcc dot gnu.org
2021-07-20 15:27 ` redi at gcc dot gnu.org
2021-10-12 19:41 ` cvs-commit at gcc dot gnu.org
2021-10-12 19:41 ` cvs-commit at gcc dot gnu.org [this message]
2021-11-26 16:34 ` cvs-commit at gcc dot gnu.org
2021-11-26 16:34 ` cvs-commit 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-100863-4-irmgivG1bi@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).