Debian Codegraph @

gcc/testsuite/g++.dg/expr/bound-mem-fun.C

raw
1 // Contributed by Dodji Seketeli <[email protected]>
2 // Origin PR c++/38228
3 // { dg-do compile }
4
5 struct A
6 {
7 A ();
8 template<typename T> A(T);
9 };
10
11 struct B
12 {
13 int foo();
14 };
15
16 A a = B().*(&B::foo); // { dg-error "invalid use of non-static member function" }
17
18