Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/nontype-class2.C

raw
1 // { dg-do compile { target c++20 } }
2
3 struct A {
4 int i;
5 // auto operator<=> (const A&) = default;
6 };
7 template <typename T, T t> void f()
8 {
9 g(t); // { dg-error "not declared" }
10 }
11
12 int main()
13 {
14 f<A,A{1}>();
15 }
16
17 // { dg-message "T t = A{1}" "" { target *-*-* } 0 }