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

3.0 KiB
Raw Permalink Blame History

[string.view.iterators]

27 Strings library [strings]

27.3 String view classes [string.view]

27.3.3 Class template basic_string_view [string.view.template]

27.3.3.4 Iterator support [string.view.iterators]

🔗

using const_iterator = implementation-defined;

1

#

A type that meets the requirements of a constantCpp17RandomAccessIterator ([random.access.iterators]), models contiguous_iterator ([iterator.concept.contiguous]), and meets the constexpr iterator requirements ([iterator.requirements.general]), whose value_type is the template parameter charT.

2

#

All requirements on container iterators ([container.requirements]) apply to basic_string_view::const_iterator as well.

🔗

constexpr const_iterator begin() const noexcept; constexpr const_iterator cbegin() const noexcept;

3

#

Returns: An iterator such that

if !empty(), addressof(*begin()) == data_,

otherwise, an unspecified value such that [begin(), end()) is a valid range.

🔗

constexpr const_iterator end() const noexcept; constexpr const_iterator cend() const noexcept;

4

#

Returns: begin() + size().

🔗

constexpr const_reverse_iterator rbegin() const noexcept; constexpr const_reverse_iterator crbegin() const noexcept;

5

#

Returns: const_reverse_iterator(end()).

🔗

constexpr const_reverse_iterator rend() const noexcept; constexpr const_reverse_iterator crend() const noexcept;

6

#

Returns: const_reverse_iterator(begin()).