https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80176
Bug ID: 80176
Summary: [5/6/7 Regression] cannot bind reference to static
member function using object access expression
Product: gcc
Version: 5.4.1
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
CC: tkoeppe at google dot com
Target Milestone: ---
struct X { static void foo(); } x;
void (&r)() = x.foo;
f.cc:2:17: error: invalid initialization of non-const reference of type ‘void
(&)()’ from an rvalue of type ‘void()’
void (&r)() = x.foo;
~~^~~
This was accepted by 4.3, but rejected since 4.4.0