Debian Codegraph @

gcc/testsuite/g++.dg/opt/ptrmem4.C

raw
1 // { dg-do compile }
2 // { dg-options "-O3" }
3
4 struct X { void foo (); };
5
6 template <typename>
7 inline void spawn (void (X::*fun_ptr)()) {}
8
9 void bar () {
10 void (X::*const comp)() = &X::foo;
11 spawn<int> (comp);
12 }