]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/cpp2a/nontype-class4.C
Implement P0732R2, class types in non-type template parameters.
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp2a / nontype-class4.C
1 // { dg-do compile { target c++2a } }
2
3 template <class T>
4 struct A {
5 constexpr A(T) {}
6 // auto operator<=> (const A&) = default;
7 };
8 template <A a> void f();
9
10 int main()
11 {
12 constexpr A a = 1;
13 f<a>();
14 f<1>();
15 }
16
17 // { dg-final { scan-assembler "_Z1fIXtl1AIiEEEEvv" } }
18 // { dg-final { scan-assembler-not "_Z1fIXtlK1AIiEEEEvv" } }