https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128116
Bug ID: 128116
Summary: Accepts Invalid: `template <class> struct S { static
constexpr void(& foo)(void) = nullptr; };`
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: songb432 at gmail dot com
Target Milestone: ---
``template <class> struct S { static constexpr void(& foo)(void) = nullptr;
};``
This shouldn't compile. But GCC 5~16 and GCC trunk compiles, and GCC 4.9.4
doesn't. Link: https://godbolt.org/z/zf8zb5z7o