Debian Codegraph @

gcc/testsuite/g++.dg/template/sizeof7.C

raw
1 // { dg-do compile }
2 // Testcase by: [email protected]
3 // PR c++/10858: failure with calling a method inside sizeof in a template
4
5 template <int> struct P {};
6
7 void bar ();
8
9 template <class T> struct X {
10 static int foo(void (*)());
11 P<sizeof(foo(&bar))> p;
12 };
13
14 template class X<int>;