24 Iterators library [iterators]

24.5 Iterator adaptors [predef.iterators]

24.5.3 Constant iterators and sentinels [const.iterators]

24.5.3.2 Alias templates [const.iterators.alias]

template<indirectly_readable It> using iter_const_reference_t = common_reference_t<const iter_value_t<It>&&, iter_reference_t<It>>; template<class It> concept constant-iterator = // exposition only input_iterator<It> && same_as<iter_const_reference_t<It>, iter_reference_t<It>>; template<input_iterator I> using const_iterator = see below;
Result: If I models constant-iterator, I.
Otherwise, basic_const_iterator<I>.
template<semiregular S> using const_sentinel = see below;
Result: If S models input_iterator, const_iterator<S>.
Otherwise, S.