Debian Codegraph @

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

raw
1 // { dg-do compile { target c++20 } }
2
3 template<auto>
4 struct S { };
5
6 struct R { };
7
8 void
9 g (void)
10 {
11 S<R()> s; // { dg-error "mismatch" }
12 // { dg-message "treated as function" "note" { target *-*-* } .-1 }
13 S<R{}> s2;
14 S<int()> s3; // { dg-error "mismatch" }
15 // { dg-message "treated as function" "note" { target *-*-* } .-1 }
16 S<int{}> s4;
17 }