operator==,!=(std::match_results) - cppreference.com (original) (raw)
Compares two match_results
objects.
Two match_results
are equal if the following conditions are met:
neither of the objects is ready, or
both match results are ready and the following conditions are met:
lhs.empty() and rhs.empty(), or
!lhs.empty() and !rhs.empty() and 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()
Checks if lhs and rhs are equal.
Checks if lhs and rhs are not equal.
The != operator is synthesized from operator==. | (since C++20) |
---|
[edit] Parameters
lhs, rhs | - | match results to compare |
---|---|---|
Type requirements | ||
-BidirIt must meet the requirements of LegacyBidirectionalIterator. | ||
-Alloc must meet the requirements of Allocator. |
[edit] Return value
true if lhs and rhs are equal, false otherwise.
true if lhs and rhs are not equal, false otherwise.
[edit] Exceptions
May throw implementation-defined exceptions.