31 Regular expressions library [re]

31.10 Class template match_­results [re.results]

31.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 если ни один из результатов матча не готов, false если готов один результат матча, а другой - нет. Если готовы оба результата совпадения, возвращается, true только если:

  • m1.empty() && m2.empty(), или

  • !m1.empty() && !m2.empty(), и выполняются следующие условия:

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

    • m1.size() == m2.size() && equal(m1.begin(), m1.end(), m2.begin()), а также

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

[ Note: Алгоритм equal определен в п [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).