summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/sizeof7.C
blob: 4964bfd25d95f0c0cdb0ef837a2103ad2ed66e3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// { dg-do compile }
// Testcase by: bangerth@dealii.org
// PR c++/10858: failure with calling a method inside sizeof in a template

    template <int> struct P {};
    
    void bar ();
    
    template <class T> struct X {
        static int foo(void (*)());
        P<sizeof(foo(&bar))> p;    
    };
    
    template class X<int>;