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

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Accepts Invalid: `template  |static constexpr reference
                   |<class> struct S { static   |can bind to nullptr while
                   |constexpr void(& foo)(void) |inside a template
                   |= nullptr; };`              |
   Last reconfirmed|                            |2026-10-24
             Status|UNCONFIRMED                 |NEW
             Blocks|                            |55004
     Ever confirmed|0                           |1

--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.  It is any reference and not just a reference to a function.
```
template <class> struct S
{
    static constexpr int &foo = 0;
};
S<int> s;
```

Is also incorrectly accepted.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
[Bug 55004] [meta-bug] constexpr issues

Reply via email to