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 。
参数
| 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 则返回 true :
- begin == rhs.begin
- end == rhs.end
- pregex == rhs.pregex
- flags == rhs.flags
- match[0] == rhs.match[0]
2) 返回 !(*this == rhs)
示例
| 本节未完成 原因:暂无示例 |