[re.results.const]

# 28 Text processing library [[text]](./#text)

## 28.6 Regular expressions library [[re]](re#results.const)

### 28.6.9 Class template match_results [[re.results]](re.results#const)

#### 28.6.9.2 Constructors [re.results.const]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L11244)

Table [122](#tab:re.results.const "Table 122: match_­results copy/move operation postconditions") lists the postconditions ofmatch_results copy/move constructors and copy/move assignment operators[.](#1.sentence-1)

For move operations,
the results of the expressions depending on the parameter m denote
the values they had before the respective function calls[.](#1.sentence-2)

[ð](#lib:match_results,constructor)

`explicit match_results(const Allocator& a);
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L11257)

*Effects*: The stored Allocator value is constructed from a[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L11261)

*Postconditions*: ready() returns false[.](#3.sentence-1)

size() returns 0[.](#3.sentence-2)

[ð](#lib:match_results,constructor_)

`match_results(const match_results& m);
match_results(const match_results& m, const Allocator& a);
`

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L11274)

*Effects*: For the first form,
the stored Allocator value is obtained
as specified in [[container.reqmts]](container.reqmts "23.2.2.2 Container requirements")[.](#4.sentence-1)

For the second form,
the stored Allocator value is constructed from a[.](#4.sentence-2)

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L11282)

*Postconditions*: As specified in Table [122](#tab:re.results.const "Table 122: match_­results copy/move operation postconditions")[.](#5.sentence-1)

[ð](#lib:match_results,constructor__)

`match_results(match_results&& m) noexcept;
match_results(match_results&& m, const Allocator& a);
`

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L11294)

*Effects*: For the first form,
the stored Allocator value is move constructed from m.get_allocator()[.](#6.sentence-1)

For the second form,
the stored Allocator value is constructed from a[.](#6.sentence-2)

[7](#7)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L11301)

*Postconditions*: As specified in Table [122](#tab:re.results.const "Table 122: match_­results copy/move operation postconditions")[.](#7.sentence-1)

[8](#8)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L11305)

*Throws*: The second form throws nothing ifa == m.get_allocator() is true[.](#8.sentence-1)

[ð](#lib:match_results,operator=)

`match_results& operator=(const match_results& m);
`

[9](#9)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L11317)

*Postconditions*: As specified in Table [122](#tab:re.results.const "Table 122: match_­results copy/move operation postconditions")[.](#9.sentence-1)

[ð](#lib:match_results,operator=_)

`match_results& operator=(match_results&& m);
`

[10](#10)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L11328)

*Postconditions*: As specified in Table [122](#tab:re.results.const "Table 122: match_­results copy/move operation postconditions")[.](#10.sentence-1)

Table [122](#tab:re.results.const) — match_results copy/move operation postconditions [[tab:re.results.const]](./tab:re.results.const)  

| [ð](#tab:re.results.const-row-1)<br>**Element** | **Value** |
| --- | --- |
| [ð](#tab:re.results.const-row-2)<br>ready() | m.ready() |
| [ð](#tab:re.results.const-row-3)<br>size() | m.size() |
| [ð](#tab:re.results.const-row-4)<br>str(n) | m.str(n) for all non-negative integers n < m.size() |
| [ð](#tab:re.results.const-row-5)<br>prefix() | m.prefix() |
| [ð](#tab:re.results.const-row-6)<br>suffix() | m.suffix() |
| [ð](#tab:re.results.const-row-7)<br>(*this)[n] | m[n] for all non-negative integers n < m.size() |
| [ð](#tab:re.results.const-row-8)<br>length(n) | m.length(n) for all non-negative integers n < m.size() |
| [ð](#tab:re.results.const-row-9)<br>position(n) | m.position(n) for all non-negative integers n < m.size() |
