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 c++/100065] Conditional explicit doesn't work for deduction guide Date: Wed, 09 Jun 2021 14:07:25 +0000 [thread overview] Message-ID: <bug-100065-4-XEBUhwL2Bg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100065-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100065 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>: https://gcc.gnu.org/g:0a9d8fd580d6afab669bae68e116e2135c2a8670 commit r11-8534-g0a9d8fd580d6afab669bae68e116e2135c2a8670 Author: Marek Polacek <polacek@redhat.com> Date: Mon Jun 7 16:06:00 2021 -0400 c++: explicit() ignored on deduction guide [PR100065] When we have explicit() with a value-dependent argument, we can't evaluate it at parsing time, so cp_parser_function_specifier_opt stashes the argument into the decl-specifiers and grokdeclarator then stores it into explicit_specifier_map, which is then used when substituting the function decl. grokdeclarator stores it for constructors and conversion functions, but we also need to do it for deduction guides, otherwise we'll forget that we've seen an explicit-specifier as in the attached test. PR c++/100065 gcc/cp/ChangeLog: * decl.c (grokdeclarator): Store a value-dependent explicit-specifier even for deduction guides. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/explicit18.C: New test. (cherry picked from commit 1afa4facb9348cac0349ff9c30066aa25a3608f7)
next prev parent reply other threads:[~2021-06-09 14:07 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-13 12:56 [Bug c++/100065] New: " andrey.davydov at jetbrains dot com 2021-04-13 13:46 ` [Bug c++/100065] " redi at gcc dot gnu.org 2021-04-13 14:11 ` mpolacek at gcc dot gnu.org 2021-06-08 22:30 ` cvs-commit at gcc dot gnu.org 2021-06-08 22:30 ` mpolacek at gcc dot gnu.org 2021-06-09 14:07 ` cvs-commit at gcc dot gnu.org [this message] 2021-06-09 14:13 ` mpolacek 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-100065-4-XEBUhwL2Bg@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).