| 1 |
// PR c++/99008 |
| 2 |
// { dg-do compile { target c++17 } } |
| 3 |
|
| 4 |
template <class> struct A { A(int = 0); }; |
| 5 |
template <class = void> using B = A<int>; |
| 6 |
auto x = B{}; // { dg-error "alias template deduction only available with" "" { target c++17_only } } |
| 7 |
auto y = B(); // { dg-error "alias template deduction only available with" "" { target c++17_only } } |
| 8 |
auto z = B{1}; // { dg-error "alias template deduction only available with" "" { target c++17_only } } |
| 9 |
auto w = B(1); // { dg-error "alias template deduction only available with" "" { target c++17_only } } |