命名空间
变体
操作

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

来自 cppreference.cn
 
 
 
正则表达式库
(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 起)

[编辑] 参数

other - 另一个要比较的 regex token 迭代器

[编辑] 返回值

1) 如果 *this 等于 other,则为 true,否则为 false
2) 如果 *this 不等于 other,则为 true,否则为 false