名稱空間
變體
操作

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

來自 cppreference.com
 
 
 
正則表示式庫
(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)

[編輯] 示例