diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/lookup/using37.C')
-rw-r--r-- | gcc/testsuite/g++.dg/lookup/using37.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lookup/using37.C b/gcc/testsuite/g++.dg/lookup/using37.C new file mode 100644 index 00000000000..a71206e89f7 --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/using37.C @@ -0,0 +1,22 @@ +// PR c++/30195 +// { dg-do run } + +template<class T> struct B +{ + void foo(T) {} +}; + +template<class T> +struct D : B<int>, B<double> +{ + using B<int>::foo; + using B<double>::foo; + void bar() { foo(3); } +}; + +int main() +{ + D<int> x; + x.bar(); + return 0; +} |