std::regex_iterator<BidirIt,CharT,Traits>::operator==,operator!=
来自 cppreference.cn
< 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)。
[编辑] 示例
| 本节不完整 原因:无示例 |