“cpp/regex/regex token iterator/operator cmp”的版本间的差异

来自cppreference.com
(link to ja)
(P1614R2)
第1行: 第1行:
{{cpp/regex/regex_token_iterator/title |operator{{=}}{{=}}, operator!{{=}}}}
+
{{cpp/regex/regex_token_iterator/title |operator{{==}}, operator!{{=}}}}
 
{{cpp/regex/regex_token_iterator/navbar}}
 
{{cpp/regex/regex_token_iterator/navbar}}
 
{{dcl begin}}
 
{{dcl begin}}
{{dcl | since=c++11 | 1=
+
{{dcl | since=c++11 | 1=
 
bool operator==( const regex_token_iterator& other ) const;
 
bool operator==( const regex_token_iterator& other ) const;
 
}}
 
}}
{{dcl | since=c++11 | 1=
+
{{dcl | since=c++11 | 1=
 
bool operator!=( const regex_token_iterator& other ) const;
 
bool operator!=( const regex_token_iterator& other ) const;
 
}}
 
}}

2020年1月28日 (二) 06:43的版本

 
 
 
正则表达式库
(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_iterator 相等,若:

a) 它们都是序列尾迭代器。
b) 它们都是后缀迭代器且后缀相等。
c) 它们都不是序列尾或后缀迭代器且:
  • position == other.position
  • N == other.N
  • subs == other.subs


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

参数

other - 要比较的另一 regex_token_iterator

返回值

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