Namespaces
Variants

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

From cppreference.net
Regular expressions library
Classes
(C++11)
Algorithms
Iterators
Exceptions
Traits
Constants
(C++11)
Regex Grammar
bool operator == ( const regex_token_iterator & other ) const ;
(1) (自 C++11 起)
bool operator ! = ( const regex_token_iterator & other ) const ;
(2) (自 C++11 起)
(直至 C++20)

检查 * this other 是否等价。

两个正则表达式词法迭代器在以下情况下相等:

a) 它们都是序列末尾迭代器。
b) 它们都是后缀迭代器且后缀相等。
c) 两者均非序列终止或后缀迭代器且:
  • position == other. position
  • N == other. N
  • subs == other. subs


1) 检查 * this 是否 等于 other
2) 检查 * this 是否 不等于 other

!= 运算符由 operator== 合成生成

(C++20 起)

参数

其他 - 用于比较的另一个正则表达式词法迭代器

返回值

1) true * this 等于 other ,否则为 false
2) * this 不等于 other 则返回 true ,否则返回 false