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<class S> using const_sentinel = see below;
Result: If S models input_­iterator, const_­iterator<S>.
Otherwise, S.