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.