aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/class-deduction84.C
blob: 29f25e50c9e894c68a9f37f32d3efdd42776e55b (plain)
1
2
3
4
5
6
7
8
9
// PR c++/99008
// { dg-do compile { target c++17 } }

template <class> struct A { A(int = 0); };
template <class = void> using B = A<int>;
auto x = B{};  // { dg-error "alias template deduction only available with" "" { target c++17_only } }
auto y = B();  // { dg-error "alias template deduction only available with" "" { target c++17_only } }
auto z = B{1}; // { dg-error "alias template deduction only available with" "" { target c++17_only } }
auto w = B(1); // { dg-error "alias template deduction only available with" "" { target c++17_only } }