Files
2025-10-25 03:02:53 +03:00

1.1 KiB

[const.iterators.general]

24 Iterators library [iterators]

24.5 Iterator adaptors [predef.iterators]

24.5.3 Constant iterators and sentinels [const.iterators]

24.5.3.1 General [const.iterators.general]

1

#

Class template basic_const_iterator is an iterator adaptor with the same behavior as the underlying iterator except that its indirection operator implicitly converts the value returned by the underlying iterator's indirection operator to a type such that the adapted iterator is a constant iterator ([iterator.requirements]).

Some generic algorithms can be called with constant iterators to avoid mutation.

2

#

Specializations of basic_const_iterator are constant iterators.