diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/inherit7.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/inherit7.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/inherit7.C b/gcc/testsuite/g++.dg/template/inherit7.C new file mode 100644 index 000000000..67afbca6b --- /dev/null +++ b/gcc/testsuite/g++.dg/template/inherit7.C @@ -0,0 +1,21 @@ +// Origin: PR c++/48656 +// { dg-options "-std=c++0x" } +// { dg-do compile } + +struct A { + int f(); + int f(int); +}; + +template <typename> struct B : A +{ +}; + +template <typename T> struct C : B<T> +{ + void + g() + { + A::f(); + } +}; |