Hi,

The Ranges Illuminati introduced the ranges::borrowed_rangeconcept in C++20, which defines requirements of a range such that a function can take it by value and return iterators obtained from it without danger of dangling.

At the same time, the type helper borrowed_subrange_t have also been introduced:

template<ranges::range R>
using borrowed_subrange_t = std::conditional_t<
    ranges::borrowed_range<R>,
    ranges::subrange<ranges::iterator_t<R>>, 
    ranges::dangling
>;

whenR models borrowed_range, this type is justsubrange<ranges::iterator_t<R>>, and more importantly, it is also anranges::common_range!

So I think it is more appropriate to name it borrowed_common_subrange_t, consider following:

auto r = std::views::iota(0);
auto s = ranges::subrange{r.begin(), r.end()};
static_assert(ranges::borrowed_range<decltype(s)>);

To some extent, the subranges also can be regarded as borrowed subrange type of r, this kind of naming can be confusing:

auto b = ranges::borrowed_subrange_t<decltype(r)>{r}; // error and... why?

It will be more intuitive and more informative if we just add a common for it:

auto b = ranges::borrowed_common_subrange_t<decltype(r)>{r}; // yes, r is not common_range

What do you think?