summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/inherit6.C
blob: 241a68e5e4a55572d595d223465f337b88287fd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Origin PR c++/47172
// { dg-options "-std=c++0x" }
// { dg-do compile }

struct A
{
    int f() const;
};

template <class T>
struct B : A { };

template <class T>
struct C : B<T>
{
    void g();
};

template <class T>
void C<T>::g()
{
    A::f();
}