命名空间
变体
操作

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

来自 cppreference.cn
 
 
 
正则表达式库
(C++11)
算法
迭代器
异常
特性
常量
(C++11)
正则表达式语法
 
 
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) 如果 *thisrhs 都是序列结束迭代器,或者所有以下条件都为真,则返回 true
  • begin == rhs.begin
  • end == rhs.end
  • pregex == rhs.pregex
  • flags == rhs.flags
  • match[0] == rhs.match[0]
2) 返回 !(*this == rhs)

[编辑] 示例