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

来自cppreference.com
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)

示例