A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../regex/basic_regex/../match_results/operator_cmp.html below:

operator==,!=(std::match_results) - cppreference.com

template< class BidirIt, class Alloc >

bool operator==( match_results<BidirIt,Alloc>& lhs,

                 match_results<BidirIt,Alloc>& rhs );
(1) (since C++11) template< class BidirIt, class Alloc >

bool operator!=( match_results<BidirIt,Alloc>& lhs,

                 match_results<BidirIt,Alloc>& rhs );
(2) (since C++11)
(until C++20)

Compares two match_results objects.

Two match_results are equal if the following conditions are met:

  • lhs.prefix() == rhs.prefix()
  • lhs.size() == rhs.size() && std::equal(lhs.begin(), lhs.end(), rhs.begin())
  • lhs.suffix() == rhs.suffix()

1) Checks if lhs and rhs are equal.

2) Checks if lhs and rhs are not equal.

The != operator is synthesized from operator==.

(since C++20) [edit] Parameters [edit] Return value

1) true if lhs and rhs are equal, false otherwise.

2) true if lhs and rhs are not equal, false otherwise.

[edit] Exceptions

May throw implementation-defined exceptions.

[edit] Example

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4