Код: Выделить всё
template
inline constexpr auto c = sizeof(T) + sizeof...(Args) > 1;
template
requires c // ok
void f1() {
}
template
concept C = sizeof(T) + sizeof...(Args) > 1;
template
requires C // error: Pack expansion used as argument
// for non-pack parameter of concept.
void f2() {
}
int main() {
f1(); // ok
f2(); // error
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... n-concepts
Мобильная версия