Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/local-type1.C

raw
1 // PR c++/51048
2 // { dg-do compile { target c++11 } }
3
4 template<typename X>
5 struct A {
6 virtual void DoPush(X const& x) = 0;
7 void Push(X const& x) { DoPush(x); }
8 };
9
10 template<typename X>
11 struct B : A<X> {
12 using A<X>::Push;
13 virtual void DoPush(X const&) { }
14 };
15
16 int main() {
17 enum S { };
18 B<S>().Push(S());
19 }