1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s
7 concept D
= C
<T
> && true;
11 void no_candidate() requires(false) {}
12 // expected-note@-1 {{candidate function not viable: constraints not satisfied}} \
13 // expected-note@-1 {{because 'false' evaluated to false}}
14 void no_candidate() requires(false && false) {}
15 // expected-note@-1 {{candidate function not viable: constraints not satisfied}} \
16 // expected-note@-1 {{because 'false' evaluated to false}}
19 void subsumes() requires C
<T
>;
20 void subsumes() requires D
<T
> {};
22 void ok() requires
false;
23 void ok() requires
true {};
25 void ok2() requires
false;
28 void ambiguous() requires
true;
29 // expected-note@-1 {{candidate function}}
30 void ambiguous() requires C
<T
>;
31 // expected-note@-1 {{candidate function}}
33 template void a
<int>::no_candidate();
34 // expected-error@-1 {{no viable candidate for explicit instantiation of 'no_candidate'}}
36 template void a
<int>::ambiguous();
37 // expected-error@-1 {{partial ordering for explicit instantiation of 'ambiguous' is ambiguous}}
39 template void a
<int>::ok();
40 template void a
<int>::ok2();