Namespaces
Variants
Views
Actions

std::regex_iterator::operator==,operator!=

From cppreference.com
< cpp‎ | regex‎ | regex iterator
Revision as of 08:46, 1 August 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
bool operator==(const regex_iterator& rhs) const;
(1) (since C++11)
bool operator!=(const regex_iterator& rhs) const;
(2) (since C++11)

Compares two regex_iterators.

For the sake of exposition, assume that regex_iterator contains the following members:

1) Returns true if *this and rhs are both end-of-sequence iterators, or if all of the following conditions are true:
  • begin == rhs.begin
  • end == rhs.end
  • pregex == rhs.pregex
  • flags == rhs.flags
  • match[0] == rhs.match[0]
2) Returns !(*this == rhs)

[edit] Parameters

rhs - a regex_iterator to compare to

[edit] Example