1 // RUN: %clang_cc1 -std=c++17 -verify=expected,cxx17 %s
2 // RUN: %clang_cc1 -std=c++20 -verify=expected,cxx20 %s
3 
AA4 template<typename T> struct A { constexpr A(T) {} }; // expected-note 1+{{here}}
5 
6 A a = 0;
7 A b(0);
8 A c = A(0);
9 A d = A{0};
10 auto *p = new A(0);
11 A *q = new A(0); // expected-error {{cannot form pointer to deduced class template specialization type}}
12 
13 struct B {
operator AB14   operator A() { // expected-error {{argument deduction not allowed in conversion function type}}
15     return A(0);
16   }
17 };
18 
19 void f(A a); // expected-error {{argument deduction not allowed in function prototype}}
20 A f(); // expected-error {{argument deduction not allowed in function return type}}
21 
22 template<A a> // cxx17-error {{argument deduction not allowed in template parameter}}
23 void f();
24