Код: Выделить всё
std::vectorКод: Выделить всё
template
concept ElementIterable = requires(typename std::iterator_traits::value_type x) // requires-expression
{
x.begin(); // must have `x.begin()`
x.end(); // and `x.end()`
};
Код: Выделить всё
template requires ElementIterable
void Foo(T input);
template requires ElementIterable
void Foo(T input)
{
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/64466642/c20-concepts-element-iterable-concept[/url]
Мобильная версия