Код: Выделить всё
#include
#include
// Nested requirement
template
concept VariadicAddable = requires(Ts... vs)
{
(... + vs); // + operator is provided
requires sizeof...(Ts) > 1; // Atleast two arguments are provided
};
template
auto add_variadic(Ts... vs)
{
return (... + vs);
}
int main()
{
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79084643/trouble-with-nested-requirements-in-case-of-c-concepts[/url]