From Jason Turner

[re.results.const]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpx1gmzguv/{from.md → to.md} +31 -8
tmp/tmpx1gmzguv/{from.md → to.md} RENAMED
@@ -1,22 +1,45 @@
1
  ### Constructors <a id="re.results.const">[[re.results.const]]</a>
2
 
 
 
 
 
 
3
  ``` cpp
4
  explicit match_results(const Allocator& a);
5
  ```
6
 
 
 
7
  *Ensures:* `ready()` returns `false`. `size()` returns `0`.
8
 
 
 
 
 
 
 
 
 
 
 
 
9
  ``` cpp
10
  match_results(match_results&& m) noexcept;
 
11
  ```
12
 
13
- *Effects:* The stored `Allocator` value is move constructed from
14
- `m.get_allocator()`.
 
15
 
16
  *Ensures:* As specified in [[re.results.const]].
17
 
 
 
 
18
  ``` cpp
19
  match_results& operator=(const match_results& m);
20
  ```
21
 
22
  *Ensures:* As specified in [[re.results.const]].
@@ -25,19 +48,19 @@ match_results& operator=(const match_results& m);
25
  match_results& operator=(match_results&& m);
26
  ```
27
 
28
  *Ensures:* As specified in [[re.results.const]].
29
 
30
- **Table: `match_results` assignment operator effects** <a id="re.results.const">[re.results.const]</a>
31
 
32
  | Element | Value |
33
- | ------------- | ----------------------------------------------- |
34
  | `ready()` | `m.ready()` |
35
  | `size()` | `m.size()` |
36
- | `str(n)` | `m.str(n)` for all integers `n < m.size()` |
37
  | `prefix()` | `m.prefix()` |
38
  | `suffix()` | `m.suffix()` |
39
- | `(*this)[n]` | `m[n]` for all integers `n < m.size()` |
40
- | `length(n)` | `m.length(n)` for all integers `n < m.size()` |
41
- | `position(n)` | `m.position(n)` for all integers `n < m.size()` |
42
 
43
 
 
1
  ### Constructors <a id="re.results.const">[[re.results.const]]</a>
2
 
3
+ [[re.results.const]] lists the postconditions of `match_results`
4
+ copy/move constructors and copy/move assignment operators. For move
5
+ operations, the results of the expressions depending on the parameter
6
+ `m` denote the values they had before the respective function calls.
7
+
8
  ``` cpp
9
  explicit match_results(const Allocator& a);
10
  ```
11
 
12
+ *Effects:* The stored `Allocator` value is constructed from `a`.
13
+
14
  *Ensures:* `ready()` returns `false`. `size()` returns `0`.
15
 
16
+ ``` cpp
17
+ match_results(const match_results& m);
18
+ match_results(const match_results& m, const Allocator& a);
19
+ ```
20
+
21
+ *Effects:* For the first form, the stored `Allocator` value is obtained
22
+ as specified in [[container.reqmts]]. For the second form, the stored
23
+ `Allocator` value is constructed from `a`.
24
+
25
+ *Ensures:* As specified in [[re.results.const]].
26
+
27
  ``` cpp
28
  match_results(match_results&& m) noexcept;
29
+ match_results(match_results&& m, const Allocator& a);
30
  ```
31
 
32
+ *Effects:* For the first form, the stored `Allocator` value is move
33
+ constructed from `m.get_allocator()`. For the second form, the stored
34
+ `Allocator` value is constructed from `a`.
35
 
36
  *Ensures:* As specified in [[re.results.const]].
37
 
38
+ *Throws:* The second form throws nothing if `a == m.get_allocator()` is
39
+ `true`.
40
+
41
  ``` cpp
42
  match_results& operator=(const match_results& m);
43
  ```
44
 
45
  *Ensures:* As specified in [[re.results.const]].
 
48
  match_results& operator=(match_results&& m);
49
  ```
50
 
51
  *Ensures:* As specified in [[re.results.const]].
52
 
53
+ **Table: `match_results` copy/move operation postconditions** <a id="re.results.const">[re.results.const]</a>
54
 
55
  | Element | Value |
56
+ | ------------- | ------------------------------------------------------------ |
57
  | `ready()` | `m.ready()` |
58
  | `size()` | `m.size()` |
59
+ | `str(n)` | `m.str(n)` for all non-negative integers `n < m.size()` |
60
  | `prefix()` | `m.prefix()` |
61
  | `suffix()` | `m.suffix()` |
62
+ | `(*this)[n]` | `m[n]` for all non-negative integers `n < m.size()` |
63
+ | `length(n)` | `m.length(n)` for all non-negative integers `n < m.size()` |
64
+ | `position(n)` | `m.position(n)` for all non-negative integers `n < m.size()` |
65
 
66