public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99631] New: decltype of non-type template-parameter shouldn't be const
@ 2021-03-17 17:38 johelegp at gmail dot com
  2021-03-18 13:20 ` [Bug c++/99631] " redi at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: johelegp at gmail dot com @ 2021-03-17 17:38 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-09-24 19:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17 17:38 [Bug c++/99631] New: decltype of non-type template-parameter shouldn't be const johelegp at gmail dot com
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

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).