名稱空間
變體
操作

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

來自 cppreference.com
 
 
 
正則表示式庫
(C++11)
演算法
迭代器
異常
特性
常量
(C++11)
正則表示式語法
 
 
bool operator==( const regex_token_iterator& other ) const;
(1) (C++11 起)
bool operator!=( const regex_token_iterator& other ) const;
(2) (C++11 起)
(C++20 前)

檢查 *thisother 是否等價。

兩個 regex token 迭代器相等,若

a) 它們都是序列末迭代器。
b) 它們都是字尾迭代器且字尾相等。
c) 它們都不是序列末或字尾迭代器,且
  • position == other.position
  • N == other.N
  • subs == other.subs


1) 檢查 *this 是否等於 other
2) 檢查 *this 是否不等於 other

!= 運算子由 operator== 合成

(C++20 起)

[編輯] 引數

其他 - 另一個要比較的 regex token 迭代器

[編輯] 返回值

1)*this 等於 other 則為 true,否則為 false
2)*this 不等於 other 則為 true,否則為 false