Add contiguous iterator utilities. How about is_contiguous_iterator and as_contiguous_range:
CPP_template(typename I, typename S)(
requires RandomAccessIterator<I> &&
SizedSentinel<S, I> &&
is_contiguous_iterator<I>())
subrange<std::add_pointer_t<iter_reference_t<I>>>
as_contiguous_range(I begin, S end)
{
if(begin == end)
return {nullptr, nullptr};
else
return {addressof(*begin), addressof(*begin) + (end - begin)};
}
Longer-term goals:
inplace_merge work with forward iteratorsMaybe iterators are not necessarily countable. Is there a relation between the ability to be able to subtract two iterators to find the distance, and with the existence of a DistanceType associated type? Think of: