std::regex_token_iterator::operator++, operator++(int)

regex_token_iterator& operator++();
(C++11 起)
regex_token_iterator operator++(int);
(C++11 起)

令迭代器前进到下个子匹配。

*this 为后缀迭代器,则设置 *this 为序列尾迭代器。

否则,若 N + 1 < subs.size() ,则自增 N 并设置结果为当前匹配的地址。

否则,设置 N0 并自增 position 。若 position 不是序列尾迭代器,则运算符设置结果为当前匹配的地址。

否则,若存储于 sub 中的任何值等于 -1prev->suffix().length()0 ,则运算符设置 *this 为指向范围 [prev->suffix().first, prev->suffix().second) 的后缀迭代器。

否则,设置 *this 为序列尾迭代器。

若迭代器是序列尾迭代器则行为未定义。

参数

(无)

返回值

1) *this
2) 迭代器的先前值。

版本历史

  • (当前 | 先前) 2017年10月13日 (五) 08:34Fruderica讨论 | 贡献. . (1,143字节) (+1,143). . (以“{{cpp/regex/regex_token_iterator/title | operator++, operator++{{small|(int)}}}} {{cpp/regex/regex_token_iterator/navbar}} {{dcl begin}} {{dcl | since=c++11 | 1= reg...”为内容创建页面)