public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "johelegp at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99631] New: decltype of non-type template-parameter shouldn't be const Date: Wed, 17 Mar 2021 17:38:11 +0000 [thread overview] Message-ID: <bug-99631-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99631 Bug ID: 99631 Summary: decltype of non-type template-parameter shouldn't be const Product: gcc Version: 11.0 URL: https://godbolt.org/z/4YY5r3 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/4YY5r3. ```C++ #include<type_traits> template<auto V>constexpr bool is_const=std::is_const_v<decltype(V)>; struct A{}; static_assert(!is_const<A{}>); ``` ``` <source>:4:15: error: static assertion failed 4 | static_assert(!is_const<A{}>); | ^~~~~~~~~~~~~~ Compiler returned: 1 ``` See https://bugs.llvm.org/show_bug.cgi?id=49609#c1 for an explanation.
next reply other threads:[~2021-03-17 17:38 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-17 17:38 johelegp at gmail dot com [this message] 2021-03-18 13:20 ` [Bug c++/99631] " redi at gcc dot gnu.org 2021-03-18 13:48 ` jakub at gcc dot gnu.org 2021-03-18 23:44 ` johelegp at gmail dot com 2021-11-09 17:23 ` n60wb42d2 at relay dot firefox.com 2022-09-26 1:46 ` johelegp at gmail dot com 2022-09-26 1:47 ` johelegp at gmail dot com 2022-12-26 17:10 ` pinskia at gcc dot gnu.org 2023-09-15 17:38 ` ppalka at gcc dot gnu.org 2023-09-15 17:39 ` ppalka at gcc dot gnu.org 2023-09-15 17:41 ` ppalka at gcc dot gnu.org 2023-09-19 12:21 ` cvs-commit at gcc dot gnu.org 2023-09-24 18:42 ` cvs-commit at gcc dot gnu.org 2023-09-24 18:44 ` ppalka at gcc dot gnu.org 2023-09-24 19:13 ` danakj at orodu dot net
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-99631-4@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).