25 Iterators library [iterators]

25.5 Iterator adaptors [predef.iterators]

25.5.3 Constant iterators and sentinels [const.iterators]

25.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.