Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-pr97093.C

raw
1 // PR c++/97093
2 // { dg-do compile { target c++20 } }
3 // { dg-additional-options "-fconcepts-diagnostics-depth=3 --param=hash-table-verification-limit=10000" }
4
5 template <typename T>
6 concept C = requires (T t)
7 {
8 requires t.some_const < 2 || requires { t.some_fn (); };
9 };
10
11 template <unsigned, unsigned>
12 struct c
13 {};
14
15 template <typename T>
16 concept P = requires (T t, c <0, 1> v) { { t (v) }; }; // { dg-error "no match" }
17
18 template <P auto, P auto ...>
19 struct m
20 {
21 constexpr auto operator () (C auto) const
22 {};
23 };
24
25 struct pc
26 {
27 constexpr auto operator () (C auto) const
28 {};
29 };
30
31 constexpr auto cc = pc {};
32 constexpr auto mmcc = m <cc> {}; // { dg-error "not satisfied" }