2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / inh-ctor26.C
blob28dc33227a88fa40cb87858e3a78f7a685b5f7f9
1 // Testcase from P0136
2 // { dg-do compile { target c++11 } }
3 // { dg-options -fnew-inheriting-ctors }
5 struct A {
6   template<typename T> A(T, typename T::type = 0);
7   A(int);
8 };
9 struct B : A {
10   using A::A;
11   B(int);
13 B b(42L); // now calls B(int), used to call B<long>(long),
14           // which called A(int) due to substitution failure
15           // in A<long>(long).
17 // { dg-final { scan-assembler "_ZN1BC1Ei" } }