1*67c608a9SSaar Raz // RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
2b65b1f32SSaar Raz
3b65b1f32SSaar Raz template<typename T, typename S = char> requires (sizeof(T) + sizeof(S) < 10)
4b65b1f32SSaar Raz // expected-note@-1{{because 'sizeof(char[100]) + sizeof(char) < 10' (101 < 10) evaluated to false}}
f(T t,S s)5b65b1f32SSaar Raz void f(T t, S s) requires (sizeof(t) == 1 && sizeof(s) == 1) { };
6b65b1f32SSaar Raz // expected-note@-1{{candidate template ignored: constraints not satisfied [with T = int, S = char]}}
7b65b1f32SSaar Raz // expected-note@-2{{because 'sizeof (t) == 1' (4 == 1) evaluated to false}}
8b65b1f32SSaar Raz // expected-note@-3{{candidate template ignored: constraints not satisfied [with T = char, S = short]}}
9b65b1f32SSaar Raz // expected-note@-4{{because 'sizeof (s) == 1' (2 == 1) evaluated to false}}
10b65b1f32SSaar Raz // expected-note@-5{{candidate template ignored: constraints not satisfied [with T = char[100], S = char]}}
11b65b1f32SSaar Raz
12b65b1f32SSaar Raz template<>
f(int t,char s)13b65b1f32SSaar Raz void f<int>(int t, char s) { };
14b65b1f32SSaar Raz // expected-error@-1{{no function template matches function template specialization 'f'}}
15b65b1f32SSaar Raz
16b65b1f32SSaar Raz template<>
f(char t,short s)17b65b1f32SSaar Raz void f<char, short>(char t, short s) { };
18b65b1f32SSaar Raz // expected-error@-1{{no function template matches function template specialization 'f'}}
19b65b1f32SSaar Raz
20b65b1f32SSaar Raz template<>
f(char t[100],char s)21b65b1f32SSaar Raz void f<char[100]>(char t[100], char s) { };
22b65b1f32SSaar Raz // expected-error@-1{{no function template matches function template specialization 'f'}}
23