这不会编译:
auto out = view::closed_iota(1,100)
| view::filter([](auto item){ return item % 10; })
| view::chunk(10);
for (auto&& rng : out) {
std::cout << rng << "\n";
}
错误:
In file included from <source>:4:
/opt/compiler-explorer/libs/rangesv3/trunk/include/range/v3/view/chunk.hpp:144:36: error: no matching function for call to object of type 'const _end_::fn'
return adaptor{n_, ranges::end(this->base())};
^~~~~~~~~~~
我想知道这种行为背后的概念是什么?
如果这不满足这样的概念,为什么没有警报出现?