Namespaces
Variants
Actions

std::regex_iterator<BidirIt,CharT,Traits>::operator==,operator!=

From cppreference.com
 
C++
 
Text processing library
 
Regular expressions library
Classes
(C++11)
Algorithms
Iterators
Exceptions
Traits
Constants
(C++11)
Regex Grammar
 
std::regex_iterator
Member functions
Comparisons
regex_iterator::operator==regex_iterator::operator!=
(until C++20)
Observers
Modifiers
 
bool operator==( const regex_iterator& rhs ) const;
(1) (since C++11)
bool operator!=( const regex_iterator& rhs ) const;
(2) (since C++11)
(until C++20)

Compares two regex_iterators.

The != operator is synthesized from operator==.

(since C++20)

[edit] Parameters

rhs - a regex_iterator to compare to

[edit] Return value

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] Example

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant