Debian Codegraph @

gcc/testsuite/g++.dg/warn/pmf1.C

raw
1 // { dg-do compile }
2
3 // Origin: [email protected]
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
15 a::f() const
16 {
17 int (a::* b)() const = &f; // { dg-error "&a::f" }
18 return 0;
19 }