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 是否等價。

以下情況下,兩個正則表達式記號迭代器相等:

a) 它們都是序列尾迭代器。
b) 它們都是後綴迭代器且後綴相等。
c) 它們都不是序列尾或後綴迭代器且:
  • position == other.position
  • N == other.N
  • subs == other.subs
1) 檢查 *this 是否等於 other
2) 檢查 *this 是否不等於 other

!= 運算符從 operator== 運算符合成

(C++20 起)

[編輯] 參數

other - 要比較的另一正則表達式記號迭代器

[編輯] 返回值

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