1 // { dg-do compile } 2 3 // Origin: benko@sztaki.hu 4 5 // PR c++/10496: Incorrect pointer to member function diagnostics 6 // for constant member functions. 7 8 struct a 9 { 10 int f() const; 11 }; 12 13 14 int f()15a::f() const 16 { 17 int (a::* b)() const = &f; // { dg-error "&a::f" } 18 return 0; 19 } 20