Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / template / sizeof7.C
blob4964bfd25d95f0c0cdb0ef837a2103ad2ed66e3a
1 // { dg-do compile }
2 // Testcase by: bangerth@dealii.org
3 // PR c++/10858: failure with calling a method inside sizeof in a template
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>;