命名空间
变体
操作

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

来自 cppreference.cn
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) 如果 true,则返回 *thisrhs 都是序列末尾迭代器,或者以下所有条件均为真
  • begin == rhs.begin
  • end == rhs.end
  • pregex == rhs.pregex
  • flags == rhs.flags
  • match[0] == rhs.match[0]
2) 返回 !(*this == rhs)

[编辑] 示例