2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / using1.C
blob1ed939d45fd442c8377d47a6c6da3935d03522ef
1 // Test for hiding of used base functions when all the conversion sequences are
2 // equivalent, needed to avoid a regression on inherited default ctors.
4 struct A
6   void f(short,int=0);
7   void g(char,int=0);
8 };
10 struct B:A
12   using A::f;
13   void f(short);
14   using A::g;
15   void g(short);
18 int main()
20   B().f(1);                     // OK, derived f hides base f for single arg
21   B().f(1,2);                   // OK, base f can still be called with two args
22   B().g(1);                     // { dg-error "" } signatures differ, ambiguous