Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/inh-ctor26.C

raw
1 // Testcase from P0136
2 // { dg-do compile { target c++11 } }
3 // { dg-options -fnew-inheriting-ctors }
4
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);
12 };
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).
16
17 // { dg-final { scan-assembler "_ZN1BC1Ei" } }