std::regex_iterator<BidirIt,CharT,Traits>::operator==,operator!=
來自 cppreference.com
< cpp | regex | regex iterator
| bool operator==( const regex_iterator& rhs ) const; |
(1) | (C++11 起) |
| bool operator!=( const regex_iterator& rhs ) const; |
(2) | (C++11 起) (C++20 前) |
比較兩個 regex_iterator。
|
|
(C++20 起) |
[編輯] 引數
| rhs | - | 一個用於比較的 regex_iterator |
[編輯] 返回值
為了闡述方便,假設 regex_iterator 包含以下成員
-
BidirIt begin; -
BidirIt end; - const regex_type *pregex;
- std::regex_constants::match_flag_type flags;
- std::match_results<BidirIt> match;
1) 如果 *this 和 rhs 都是序列結束迭代器,或者所有以下條件都為真,則返回 true
- begin == rhs.begin
- end == rhs.end
- pregex == rhs.pregex
- flags == rhs.flags
- match[0] == rhs.match[0]
2) 返回 !(*this == rhs)。
[編輯] 示例
| 本節不完整 原因:無示例 |