public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ppalka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/103891] clang-13 fails to compile libstdc++'s std::variant<std::vector<int>>: error: attempt to use a deleted function Date: Mon, 03 Jan 2022 15:55:08 +0000 [thread overview] Message-ID: <bug-103891-4-EqIEB8rvX1@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103891-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103891 Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ppalka at gcc dot gnu.org --- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> --- Further reduction: template<typename _First> union _Variadic_union { ~_Variadic_union() = default; ~_Variadic_union() requires true { } _First _M_first; }; struct vector { ~vector(); }; _Variadic_union<vector> v; Which Clang rejects with: 103891.ii:10:25: error: attempt to use a deleted function _Variadic_union<vector> v; ^ 103891.ii:3:3: note: explicitly defaulted function was implicitly deleted here ~_Variadic_union() = default; ^ 103891.ii:5:10: note: destructor of '_Variadic_union<vector>' is implicitly deleted because variant field '_M_first' has a non-trivial destructor _First _M_first; ^ So it looks like Clang is selecting the less specialized defaulted destructor, which doesn't seem correct.
next prev parent reply other threads:[~2022-01-03 15:55 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-02 21:40 [Bug libstdc++/103891] New: " slyfox at gcc dot gnu.org 2022-01-02 21:59 ` [Bug libstdc++/103891] " pinskia at gcc dot gnu.org 2022-01-03 15:55 ` ppalka at gcc dot gnu.org [this message] 2022-01-04 10:07 ` redi at gcc dot gnu.org 2022-01-04 10:17 ` redi at gcc dot gnu.org 2022-01-09 9:10 ` slyfox at gcc dot gnu.org 2022-01-11 13:24 ` cvs-commit at gcc dot gnu.org 2022-01-11 13:32 ` redi at gcc dot gnu.org 2022-01-11 16:27 ` slyfox at gcc dot gnu.org 2022-02-14 13:06 ` 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-103891-4-EqIEB8rvX1@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).