Namespaces
Variants

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

From cppreference.net
Regular expressions library
Classes
(C++11)
Algorithms
Iterators
Exceptions
Traits
Constants
(C++11)
Regex Grammar
bool operator == ( const regex_iterator & rhs ) const ;
(1) (自 C++11 起)
bool operator ! = ( const regex_iterator & rhs ) const ;
(2) (自 C++11 起)
(直至 C++20)

比较两个 regex_iterator

!= 运算符由 operator== 合成生成

(C++20 起)

参数

rhs - 用于比较的 regex_iterator 对象

返回值

为便于说明,假设 regex_iterator 包含以下成员:

1) * this rhs 均为序列结束迭代器,或满足以下全部条件时返回 true
  • begin == rhs. begin
  • end == rhs. end
  • pregex == rhs. pregex
  • flags == rhs. flags
  • match [ 0 ] == rhs. match [ 0 ]
2) 返回 ! ( * this == rhs )

示例