28 Regular expressions library [re]

28.10 Class template match_results [re.results]

28.10.8 match_results non-member functions [re.results.nonmember]

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

Returns: true if neither match result is ready, false if one match result is ready and the other is not. If both match results are ready, returns true only if:

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

  • !m1.empty() && !m2.empty(), and the following conditions are satisfied:

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

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

    • m1.suffix() == m2.suffix().

Note: The algorithm equal is defined in Clause [algorithms].  — end note ]

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

Returns: !(m1 == m2).