From Jason Turner

[re.alg]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmped352jyw/{from.md → to.md} +17 -17
tmp/tmped352jyw/{from.md → to.md} RENAMED
@@ -1,12 +1,12 @@
1
  ## Regular expression algorithms <a id="re.alg">[[re.alg]]</a>
2
 
3
  ### Exceptions <a id="re.except">[[re.except]]</a>
4
 
5
- The algorithms described in this subclause may throw an exception of
6
- type `regex_error`. If such an exception `e` is thrown, `e.code()` shall
7
- return either `regex_constants::error_complexity` or
8
  `regex_constants::error_stack`.
9
 
10
  ### `regex_match` <a id="re.alg.match">[[re.alg.match]]</a>
11
 
12
  ``` cpp
@@ -15,12 +15,12 @@ template <class BidirectionalIterator, class Allocator, class charT, class trait
15
  match_results<BidirectionalIterator, Allocator>& m,
16
  const basic_regex<charT, traits>& e,
17
  regex_constants::match_flag_type flags = regex_constants::match_default);
18
  ```
19
 
20
- *Requires:* The type `BidirectionalIterator` shall satisfy the
21
- requirements of a Bidirectional Iterator ([[bidirectional.iterators]]).
22
 
23
  *Effects:* Determines whether there is a match between the regular
24
  expression `e`, and all of the character sequence \[`first`, `last`).
25
  The parameter `flags` is used to control how the expression is matched
26
  against the character sequence. When determining if there is a match,
@@ -38,16 +38,16 @@ regex_search("GetValues", m, re); // returns true, and m[0] contains "Get"
38
  regex_match ("GetValues", m, re); // returns false
39
  ```
40
 
41
  — *end example*]
42
 
43
- *Postconditions:* `m.ready() == true` in all cases. If the function
44
- returns `false`, then the effect on parameter `m` is unspecified except
45
- that `m.size()` returns `0` and `m.empty()` returns `true`. Otherwise
46
- the effects on parameter `m` are given in Table  [[tab:re:alg:match]].
47
 
48
- **Table: Effects of `regex_match` algorithm** <a id="tab:re:alg:match">[tab:re:alg:match]</a>
49
 
50
  | Element | Value |
51
  | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52
  | `m.size()` | `1 + e.mark_count()` |
53
  | `m.empty()` | `false` |
@@ -124,25 +124,25 @@ template <class BidirectionalIterator, class Allocator, class charT, class trait
124
  match_results<BidirectionalIterator, Allocator>& m,
125
  const basic_regex<charT, traits>& e,
126
  regex_constants::match_flag_type flags = regex_constants::match_default);
127
  ```
128
 
129
- *Requires:* Type `BidirectionalIterator` shall satisfy the requirements
130
- of a Bidirectional Iterator ([[bidirectional.iterators]]).
131
 
132
  *Effects:* Determines whether there is some sub-sequence within
133
  \[`first`, `last`) that matches the regular expression `e`. The
134
  parameter `flags` is used to control how the expression is matched
135
  against the character sequence. Returns `true` if such a sequence
136
  exists, `false` otherwise.
137
 
138
- *Postconditions:* `m.ready() == true` in all cases. If the function
139
- returns `false`, then the effect on parameter `m` is unspecified except
140
- that `m.size()` returns `0` and `m.empty()` returns `true`. Otherwise
141
- the effects on parameter `m` are given in Table  [[tab:re:alg:search]].
142
 
143
- **Table: Effects of `regex_search` algorithm** <a id="tab:re:alg:search">[tab:re:alg:search]</a>
144
 
145
  | Element | Value |
146
  | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
147
  | `m.size()` | `1 + e.mark_count()` |
148
  | `m.empty()` | `false` |
 
1
  ## Regular expression algorithms <a id="re.alg">[[re.alg]]</a>
2
 
3
  ### Exceptions <a id="re.except">[[re.except]]</a>
4
 
5
+ The algorithms described in subclause  [[re.alg]] may throw an exception
6
+ of type `regex_error`. If such an exception `e` is thrown, `e.code()`
7
+ shall return either `regex_constants::error_complexity` or
8
  `regex_constants::error_stack`.
9
 
10
  ### `regex_match` <a id="re.alg.match">[[re.alg.match]]</a>
11
 
12
  ``` cpp
 
15
  match_results<BidirectionalIterator, Allocator>& m,
16
  const basic_regex<charT, traits>& e,
17
  regex_constants::match_flag_type flags = regex_constants::match_default);
18
  ```
19
 
20
+ *Preconditions:* `BidirectionalIterator` meets the
21
+ *Cpp17BidirectionalIterator* requirements [[bidirectional.iterators]].
22
 
23
  *Effects:* Determines whether there is a match between the regular
24
  expression `e`, and all of the character sequence \[`first`, `last`).
25
  The parameter `flags` is used to control how the expression is matched
26
  against the character sequence. When determining if there is a match,
 
38
  regex_match ("GetValues", m, re); // returns false
39
  ```
40
 
41
  — *end example*]
42
 
43
+ *Ensures:* `m.ready() == true` in all cases. If the function returns
44
+ `false`, then the effect on parameter `m` is unspecified except that
45
+ `m.size()` returns `0` and `m.empty()` returns `true`. Otherwise the
46
+ effects on parameter `m` are given in [[re.alg.match]].
47
 
48
+ **Table: Effects of `regex_match` algorithm** <a id="re.alg.match">[re.alg.match]</a>
49
 
50
  | Element | Value |
51
  | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52
  | `m.size()` | `1 + e.mark_count()` |
53
  | `m.empty()` | `false` |
 
124
  match_results<BidirectionalIterator, Allocator>& m,
125
  const basic_regex<charT, traits>& e,
126
  regex_constants::match_flag_type flags = regex_constants::match_default);
127
  ```
128
 
129
+ *Preconditions:* `BidirectionalIterator` meets the
130
+ *Cpp17BidirectionalIterator* requirements [[bidirectional.iterators]].
131
 
132
  *Effects:* Determines whether there is some sub-sequence within
133
  \[`first`, `last`) that matches the regular expression `e`. The
134
  parameter `flags` is used to control how the expression is matched
135
  against the character sequence. Returns `true` if such a sequence
136
  exists, `false` otherwise.
137
 
138
+ *Ensures:* `m.ready() == true` in all cases. If the function returns
139
+ `false`, then the effect on parameter `m` is unspecified except that
140
+ `m.size()` returns `0` and `m.empty()` returns `true`. Otherwise the
141
+ effects on parameter `m` are given in [[re.alg.search]].
142
 
143
+ **Table: Effects of `regex_search` algorithm** <a id="re.alg.search">[re.alg.search]</a>
144
 
145
  | Element | Value |
146
  | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
147
  | `m.size()` | `1 + e.mark_count()` |
148
  | `m.empty()` | `false` |