Open dvirtz opened 2 years ago
The docs say that irange produces a random access range but that's not true for the strided version.
irange
The following code fails to compile:
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<decltype(boost::irange(0, 10))> )); BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<decltype(boost::irange(0, 10, 1))> )); // fails here
See https://gcc.godbolt.org/z/n4hqjj5bf
The reason is that random access (in fact, even forward) concept requires the iterator to be default constructible which integer_iterator_with_step is not.
integer_iterator_with_step
The docs say that
irange
produces a random access range but that's not true for the strided version.The following code fails to compile:
See https://gcc.godbolt.org/z/n4hqjj5bf
The reason is that random access (in fact, even forward) concept requires the iterator to be default constructible which
integer_iterator_with_step
is not.