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>;
15