[re.results.nonmember]

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

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

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

#### 28.6.9.9 Non-member functions [re.results.nonmember]

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

`template<class BidirectionalIterator, class Allocator>
  bool operator==(const match_results<BidirectionalIterator, Allocator>& m1,
                  const match_results<BidirectionalIterator, Allocator>& m2);
`

[1](#1)

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

*Returns*: true if neither match result is ready, false if one match result is ready and the
other is not[.](#1.sentence-1)

If both match results are ready, returns true only if

- [(1.1)](#1.1)

m1.empty() && m2.empty(), or

- [(1.2)](#1.2)

!m1.empty() && !m2.empty(), and the following conditions are satisfied:
  * [(1.2.1)](#1.2.1)

m1.prefix() == m2.prefix(),

  * [(1.2.2)](#1.2.2)

m1.size() == m2.size() && equal(m1.begin(), m1.end(), m2.begin()), and

  * [(1.2.3)](#1.2.3)

m1.suffix() == m2.suffix()[.](#1.sentence-2)

[*Note [1](#note-1)*:

The algorithm equal is defined in [[algorithms]](algorithms "26 Algorithms library")[.](#1.sentence-3)

â *end note*]
