diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/lookup/using33.C')
-rw-r--r-- | gcc/testsuite/g++.dg/lookup/using33.C | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lookup/using33.C b/gcc/testsuite/g++.dg/lookup/using33.C new file mode 100644 index 00000000000..a80be036442 --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/using33.C @@ -0,0 +1,26 @@ +// { dg-do run } + +template <class T> +struct Foo +{ + int k (float) {return 0;} +}; + +template <class T> +struct Baz +{ + int k (int) {return 1;} +}; + +template <class T> +struct Bar : Foo<T> , Baz<T> +{ + using Foo<T>::k; + using Baz<T>::k; +}; + +int main() +{ + Bar<int> bar; + return bar.k( 1.0f ); +} |