diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/inherit6.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/inherit6.C | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/inherit6.C b/gcc/testsuite/g++.dg/template/inherit6.C new file mode 100644 index 000000000..241a68e5e --- /dev/null +++ b/gcc/testsuite/g++.dg/template/inherit6.C @@ -0,0 +1,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(); +} |