[re.results.swap]

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

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

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

#### 28.6.9.8 Swap [re.results.swap]

[ð](#lib:match_results,swap)

`void swap(match_results& that);
`

[1](#1)

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

*Effects*: Swaps the contents of the two sequences[.](#1.sentence-1)

[2](#2)

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

*Postconditions*: *this contains the sequence of matched
sub-expressions that were in that, that contains the
sequence of matched sub-expressions that were in *this[.](#2.sentence-1)

[3](#3)

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

*Complexity*: Constant time[.](#3.sentence-1)

[ð](#lib:match_results,swap_)

`template<class BidirectionalIterator, class Allocator>
  void swap(match_results<BidirectionalIterator, Allocator>& m1,
            match_results<BidirectionalIterator, Allocator>& m2);
`

[4](#4)

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

*Effects*: As if by m1.swap(m2)[.](#4.sentence-1)
