Код: Выделить всё
#include
#include
int main() {
auto vec = std::vector{1, 2, 3};
auto rng = std::ranges::subrange(vec.begin(), vec.end(), 3); // error
}
no viable constructor or deduction guide for deduction of template arguments of 'subrange'
However, as per cppref,
Код: Выделить всё
std::ranges::subrangeWhy does
Код: Выделить всё
std::ranges::subrangeИсточник: https://stackoverflow.com/questions/781 ... s-expected
Мобильная версия