4.5 KiB
[re.results.const]
28 Text processing library [text]
28.6 Regular expressions library [re]
28.6.9 Class template match_results [re.results]
28.6.9.2 Constructors [re.results.const]
Table 122 lists the postconditions ofmatch_results copy/move constructors and copy/move assignment operators.
For move operations, the results of the expressions depending on the parameter m denote the values they had before the respective function calls.
explicit match_results(const Allocator& a);
Effects: The stored Allocator value is constructed from a.
Postconditions: ready() returns false.
size() returns 0.
match_results(const match_results& m); match_results(const match_results& m, const Allocator& a);
Effects: For the first form, the stored Allocator value is obtained as specified in [container.reqmts].
For the second form, the stored Allocator value is constructed from a.
Postconditions: As specified in Table 122.
match_results(match_results&& m) noexcept; match_results(match_results&& m, const Allocator& a);
Effects: For the first form, the stored Allocator value is move constructed from m.get_allocator().
For the second form, the stored Allocator value is constructed from a.
Postconditions: As specified in Table 122.
Throws: The second form throws nothing ifa == m.get_allocator() is true.
match_results& operator=(const match_results& m);
Postconditions: As specified in Table 122.
match_results& operator=(match_results&& m);
Postconditions: As specified in Table 122.
Table 122 — match_results copy/move operation postconditions [tab:re.results.const]
| ð Element |
Value |
|---|---|
| ð ready() |
m.ready() |
| ð size() |
m.size() |
| ð str(n) |
m.str(n) for all non-negative integers n < m.size() |
| ð prefix() |
m.prefix() |
| ð suffix() |
m.suffix() |
| ð (*this)[n] |
m[n] for all non-negative integers n < m.size() |
| ð length(n) |
m.length(n) for all non-negative integers n < m.size() |
| ð position(n) |
m.position(n) for all non-negative integers n < m.size() |