public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi 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: Mon, 19 Jul 2021 11:47:09 +0000 [thread overview] Message-ID: <bug-100863-4-Pij7g50OTI@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 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Status|RESOLVED |REOPENED --- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- My fix causes a regression: #include <unordered_set> template <typename Tp> struct Allocator { using value_type = Tp; Allocator(int) noexcept { } template <class T> Allocator(const Allocator<T>&) { } Tp *allocate(std::size_t n) { return std::allocator<Tp>().allocate(n); } void deallocate(Tp *p, std::size_t n) { std::allocator<Tp>().deallocate(p, n); } }; using Set = std::unordered_set<int, std::hash<int>, std::equal_to<int>, Allocator<int>>; static_assert( ! std::is_default_constructible<Set>::value, "" ); The standard doesn't require the trait to be true, but it was (because we defined the default constructors as defaulted all the way down to the EBO helper). With the change above, the EBO helper for an empty class does: _Hashtable_ebo_helper() noexcept(noexcept(_Tp())) : _Tp() { } which is ill-formed now, not implicitly deleted. I have a patch to make it use [[no_unique_address]], so we can default it again.
next prev parent reply other threads:[~2021-07-19 11:47 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 [this message] 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 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-Pij7g50OTI@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: linkBe 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).