From Jason Turner

[string.view.iterators]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmps7hb1781/{from.md → to.md} +50 -0
tmp/tmps7hb1781/{from.md → to.md} RENAMED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Iterator support <a id="string.view.iterators">[[string.view.iterators]]</a>
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;
32
+ constexpr const_iterator cend() const noexcept;
33
+ ```
34
+
35
+ *Returns:* `begin() + size()`.
36
+
37
+ ``` cpp
38
+ constexpr const_reverse_iterator rbegin() const noexcept;
39
+ constexpr const_reverse_iterator crbegin() const noexcept;
40
+ ```
41
+
42
+ *Returns:* `const_reverse_iterator(end())`.
43
+
44
+ ``` cpp
45
+ constexpr const_reverse_iterator rend() const noexcept;
46
+ constexpr const_reverse_iterator crend() const noexcept;
47
+ ```
48
+
49
+ *Returns:* `const_reverse_iterator(begin())`.
50
+