From Jason Turner

[re.tokiter]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpu4uboxkb/{from.md → to.md} +10 -19
tmp/tmpu4uboxkb/{from.md → to.md} RENAMED
@@ -101,11 +101,10 @@ namespace std {
101
  regex_constants::match_flag_type m =
102
  regex_constants::match_default) = delete;
103
  regex_token_iterator(const regex_token_iterator&);
104
  regex_token_iterator& operator=(const regex_token_iterator&);
105
  bool operator==(const regex_token_iterator&) const;
106
- bool operator!=(const regex_token_iterator&) const;
107
  const value_type& operator*() const;
108
  const value_type* operator->() const;
109
  regex_token_iterator& operator++();
110
  regex_token_iterator operator++(int);
111
 
@@ -128,16 +127,16 @@ suffix iterator the member `result` holds a pointer to the data member
128
  `suffix.first` points to the beginning of the final sequence, and
129
  `suffix.second` points to the end of the final sequence.
130
 
131
  [*Note 1*: For a suffix iterator, data member `suffix.first` is the
132
  same as the end of the last match found, and `suffix.second` is the same
133
- as the end of the target sequence — *end note*]
134
 
135
  The *current match* is `(*position).prefix()` if `subs[N] == -1`, or
136
  `(*position)[subs[N]]` for any other value of `subs[N]`.
137
 
138
- #### `regex_token_iterator` constructors <a id="re.tokiter.cnstr">[[re.tokiter.cnstr]]</a>
139
 
140
  ``` cpp
141
  regex_token_iterator();
142
  ```
143
 
@@ -164,30 +163,28 @@ template <size_t N>
164
  const regex_type& re,
165
  const int (&submatches)[N],
166
  regex_constants::match_flag_type m = regex_constants::match_default);
167
  ```
168
 
169
- *Requires:* Each of the initialization values of `submatches` shall be
170
  `>= -1`.
171
 
172
  *Effects:* The first constructor initializes the member `subs` to hold
173
- the single value `submatch`. The second constructor initializes the
174
- member `subs` to hold a copy of the argument `submatches`. The third and
175
- fourth constructors initialize the member `subs` to hold a copy of the
176
- sequence of integer values pointed to by the iterator range
177
- \[`submatches.begin()`, `submatches.end()`) and \[`&submatches`,
178
- `&submatches + N`), respectively.
179
 
180
  Each constructor then sets `N` to 0, and `position` to
181
  `position_iterator(a, b, re, m)`. If `position` is not an
182
  end-of-sequence iterator the constructor sets `result` to the address of
183
  the current match. Otherwise if any of the values stored in `subs` is
184
  equal to -1 the constructor sets `*this` to a suffix iterator that
185
  points to the range \[`a`, `b`), otherwise the constructor sets `*this`
186
  to an end-of-sequence iterator.
187
 
188
- #### `regex_token_iterator` comparisons <a id="re.tokiter.comp">[[re.tokiter.comp]]</a>
189
 
190
  ``` cpp
191
  bool operator==(const regex_token_iterator& right) const;
192
  ```
193
 
@@ -196,17 +193,11 @@ iterators, or if `*this` and `right` are both suffix iterators and
196
  `suffix == right.suffix`; otherwise returns `false` if `*this` or
197
  `right` is an end-of-sequence iterator or a suffix iterator. Otherwise
198
  returns `true` if `position == right.position`, `N == right.N`, and
199
  `subs == right.subs`. Otherwise returns `false`.
200
 
201
- ``` cpp
202
- bool operator!=(const regex_token_iterator& right) const;
203
- ```
204
-
205
- *Returns:* `!(*this == right)`.
206
-
207
- #### `regex_token_iterator` indirection <a id="re.tokiter.deref">[[re.tokiter.deref]]</a>
208
 
209
  ``` cpp
210
  const value_type& operator*() const;
211
  ```
212
 
@@ -216,11 +207,11 @@ const value_type& operator*() const;
216
  const value_type* operator->() const;
217
  ```
218
 
219
  *Returns:* `result`.
220
 
221
- #### `regex_token_iterator` increment <a id="re.tokiter.incr">[[re.tokiter.incr]]</a>
222
 
223
  ``` cpp
224
  regex_token_iterator& operator++();
225
  ```
226
 
 
101
  regex_constants::match_flag_type m =
102
  regex_constants::match_default) = delete;
103
  regex_token_iterator(const regex_token_iterator&);
104
  regex_token_iterator& operator=(const regex_token_iterator&);
105
  bool operator==(const regex_token_iterator&) const;
 
106
  const value_type& operator*() const;
107
  const value_type* operator->() const;
108
  regex_token_iterator& operator++();
109
  regex_token_iterator operator++(int);
110
 
 
127
  `suffix.first` points to the beginning of the final sequence, and
128
  `suffix.second` points to the end of the final sequence.
129
 
130
  [*Note 1*: For a suffix iterator, data member `suffix.first` is the
131
  same as the end of the last match found, and `suffix.second` is the same
132
+ as the end of the target sequence. — *end note*]
133
 
134
  The *current match* is `(*position).prefix()` if `subs[N] == -1`, or
135
  `(*position)[subs[N]]` for any other value of `subs[N]`.
136
 
137
+ #### Constructors <a id="re.tokiter.cnstr">[[re.tokiter.cnstr]]</a>
138
 
139
  ``` cpp
140
  regex_token_iterator();
141
  ```
142
 
 
163
  const regex_type& re,
164
  const int (&submatches)[N],
165
  regex_constants::match_flag_type m = regex_constants::match_default);
166
  ```
167
 
168
+ *Preconditions:* Each of the initialization values of `submatches` is
169
  `>= -1`.
170
 
171
  *Effects:* The first constructor initializes the member `subs` to hold
172
+ the single value `submatch`. The second, third, and fourth constructors
173
+ initialize the member `subs` to hold a copy of the sequence of integer
174
+ values pointed to by the iterator range \[`begin(submatches)`,
175
+ `end(submatches)`).
 
 
176
 
177
  Each constructor then sets `N` to 0, and `position` to
178
  `position_iterator(a, b, re, m)`. If `position` is not an
179
  end-of-sequence iterator the constructor sets `result` to the address of
180
  the current match. Otherwise if any of the values stored in `subs` is
181
  equal to -1 the constructor sets `*this` to a suffix iterator that
182
  points to the range \[`a`, `b`), otherwise the constructor sets `*this`
183
  to an end-of-sequence iterator.
184
 
185
+ #### Comparisons <a id="re.tokiter.comp">[[re.tokiter.comp]]</a>
186
 
187
  ``` cpp
188
  bool operator==(const regex_token_iterator& right) const;
189
  ```
190
 
 
193
  `suffix == right.suffix`; otherwise returns `false` if `*this` or
194
  `right` is an end-of-sequence iterator or a suffix iterator. Otherwise
195
  returns `true` if `position == right.position`, `N == right.N`, and
196
  `subs == right.subs`. Otherwise returns `false`.
197
 
198
+ #### Indirection <a id="re.tokiter.deref">[[re.tokiter.deref]]</a>
 
 
 
 
 
 
199
 
200
  ``` cpp
201
  const value_type& operator*() const;
202
  ```
203
 
 
207
  const value_type* operator->() const;
208
  ```
209
 
210
  *Returns:* `result`.
211
 
212
+ #### Increment <a id="re.tokiter.incr">[[re.tokiter.incr]]</a>
213
 
214
  ``` cpp
215
  regex_token_iterator& operator++();
216
  ```
217