Debian Codegraph @

gcc/testsuite/g++.dg/lookup/using44.C

raw
1 // PR c++/30195
2 // { dg-do run }
3
4 template <class T>
5 struct B
6 {
7 void foo(char) { __builtin_abort(); }
8 void foo(short) { __builtin_abort(); }
9 void foo(T) {}
10 };
11
12 template<class T>
13 struct Out
14 {
15 struct D : B<T>, B<double>
16 {
17 using B<T>::foo;
18 using B<double>::foo;
19 void bar() { foo(3); }
20 };
21 };
22
23 int main()
24 {
25 Out<int>::D x;
26 x.bar();
27 return 0;
28 }