OSDN Git Service

PR c++/54858
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / sizeof7.C
1 // { dg-do compile }
2 // Testcase by: bangerth@dealii.org
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>;