[Bug c++/102194] Incorrect explicit instantiation of constexpr variable accepted

michael.kenzel at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Mar 11 02:31:20 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102194

Michael Kenzel <michael.kenzel at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michael.kenzel at gmail dot com

--- Comment #1 from Michael Kenzel <michael.kenzel at gmail dot com> ---
I've just stumbled upon this bug as well:

        template <int N>
        constexpr int c = N;

        template int c<42>;  // should be an error

https://godbolt.org/z/jxojs64GK


More information about the Gcc-bugs mailing list