aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/class-deduction67.C
blob: fa1523d99d5af9d9b2d63ccac5b60df924da6abd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Deduction from inherited constructors isn't supported before C++23.

//{ dg-do compile { target c++17 } }

template <class T> struct A
{
  A(T);
};

template <class T> struct B: A<T>
{
  using A<T>::A;
};

int main()
{
  B b = 42;			// { dg-line init }
  // { dg-prune-output "no matching function" }
  // { dg-error "class template argument deduction" "" { target c++20_down } init }
}