From Jason Turner

[string.view.iterators]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpjngyqiqh/{from.md → to.md} +8 -11
tmp/tmpjngyqiqh/{from.md → to.md} RENAMED
@@ -2,30 +2,27 @@
2
 
3
  ``` cpp
4
  using const_iterator = implementation-defined // type of basic_string_view::const_iterator;
5
  ```
6
 
7
- A type that meets the requirements of a constant random access
8
- iterator ([[random.access.iterators]]) and of a contiguous
9
- iterator ([[iterator.requirements.general]]) whose `value_type` is the
10
- template parameter `charT`.
 
11
 
12
- For a `basic_string_view str`, any operation that invalidates a pointer
13
- in the range \[`str.data()`, `str.data() + str.size()`) invalidates
14
- pointers, iterators, and references returned from `str`’s methods.
15
-
16
- All requirements on container iterators ([[container.requirements]])
17
- apply to `basic_string_view::const_iterator` as well.
18
 
19
  ``` cpp
20
  constexpr const_iterator begin() const noexcept;
21
  constexpr const_iterator cbegin() const noexcept;
22
  ```
23
 
24
  *Returns:* An iterator such that
25
 
26
- - if `!empty()`, `&*begin() == data_`,
27
  - otherwise, an unspecified value such that \[`begin()`, `end()`) is a
28
  valid range.
29
 
30
  ``` cpp
31
  constexpr const_iterator end() const noexcept;
 
2
 
3
  ``` cpp
4
  using const_iterator = implementation-defined // type of basic_string_view::const_iterator;
5
  ```
6
 
7
+ A type that meets the requirements of a constant
8
+ *Cpp17RandomAccessIterator*[[random.access.iterators]], models
9
+ `contiguous_iterator` [[iterator.concept.contiguous]], and meets the
10
+ constexpr iterator requirements [[iterator.requirements.general]], whose
11
+ `value_type` is the template parameter `charT`.
12
 
13
+ All requirements on container iterators [[container.requirements]] apply
14
+ to `basic_string_view::const_iterator` as well.
 
 
 
 
15
 
16
  ``` cpp
17
  constexpr const_iterator begin() const noexcept;
18
  constexpr const_iterator cbegin() const noexcept;
19
  ```
20
 
21
  *Returns:* An iterator such that
22
 
23
+ - if `!empty()`, `addressof(*begin()) == data_`,
24
  - otherwise, an unspecified value such that \[`begin()`, `end()`) is a
25
  valid range.
26
 
27
  ``` cpp
28
  constexpr const_iterator end() const noexcept;