Closed maxrossi91 closed 2 years ago
Simpler example:
#include <range/v3/view/subrange.hpp>
#include <list>
int main() {
std::list<int> x = {1, 2, 3};
auto r = ranges::subrange(x.begin(), x.end());
(void)r.next();
}
subrange::next()
should work for forward ranges, but the implementation right now erroneously requires that either the subrange stores the size or the sentinel is a sized sentinel for the iterator.
Thank you very much for the fast handling of this.
Hi,
First of all thank you very much for this amazing library.
I encountered a compile error on the call of a
next()
on anunsized subrange
, namely/opt/compiler-explorer/libs/rangesv3/0.11.0/include/range/v3/view/subrange.hpp:307:32: error: no matching function for call to 'ranges::subrange<Integers::Iterator>::get_size_()'
This is reported on both v0.11.0 and v0.12.0. This error is not present when using
std::ranges
.I reproduced the error on Compiler Explorer here.
Please let me know if you need any additional information.