std::regex_token_iterator<BidirIt,CharT,Traits>:: regex_token_iterator
|
regex_token_iterator
(
)
;
|
(1) | (自 C++11 起) |
|
regex_token_iterator
(
BidirIt a, BidirIt b,
const
regex_type
&
re,
|
(2) | (自 C++11 起) |
|
regex_token_iterator
(
BidirIt a, BidirIt b,
const
regex_type
&
re,
|
(3) | (自 C++11 起) |
|
regex_token_iterator
(
BidirIt a, BidirIt b,
const
regex_type
&
re,
|
(4) | (自 C++11 起) |
|
template
<
std::
size_t
N
>
regex_token_iterator
(
BidirIt a, BidirIt b,
|
(5) | (自 C++11 起) |
|
regex_token_iterator
(
const
regex_token_iterator
&
other
)
;
|
(6) | (自 C++11 起) |
|
regex_token_iterator
(
BidirIt a, BidirIt b,
const
regex_type
&&
re,
|
(7) | (自 C++11 起) |
|
regex_token_iterator
(
BidirIt a, BidirIt b,
const
regex_type
&&
re,
|
(8) | (自 C++11 起) |
|
regex_token_iterator
(
BidirIt a, BidirIt b,
const
regex_type
&&
re,
|
(9) | (自 C++11 起) |
|
template
<
std::
size_t
N
>
regex_token_iterator
(
BidirIt a, BidirIt b,
|
(10) | (自 C++11 起) |
构造一个新的
regex_token_iterator
:
-
如果在构造后,成员
regex_iterator不是序列末尾迭代器,则将成员指针设置为当前 std::sub_match 的地址。 -
否则(如果成员
regex_iterator是序列末尾迭代器),但值 - 1 是 submatches / submatch 中的值之一,则将 * this 转换为指向范围[a,b)的 后缀迭代器 (整个字符串是未匹配的后缀)。 - 否则(如果 - 1 不在 submatches 列表中),则将 * this 转换为序列末尾迭代器。
如果 submatches 中的任何值小于 - 1 ,则行为未定义。
regex_iterator
以及指向当前
sub_match
的成员指针)。
参数
| a | - | 指向目标字符序列起始位置的 LegacyBidirectionalIterator |
| b | - | td> 指向目标字符序列结束位置的 LegacyBidirectionalIterator|
| re | - | 用于搜索目标字符序列的正则表达式 |
| submatch | - | 应返回的子匹配索引。"0"表示完整匹配,"-1"表示未匹配部分(例如匹配之间的内容) |
| submatches | - | 在每个匹配中应遍历的子匹配索引序列,可能包含特殊值 - 1 表示未匹配片段 |
| m | - | 控制 re 行为的标志位 |
示例
|
本节内容不完整
原因:缺少示例 |
缺陷报告
以下行为变更缺陷报告被追溯应用于先前发布的C++标准。
| 缺陷报告 | 应用于 | 发布时的行为 | 正确行为 |
|---|---|---|---|
| LWG 2332 | C++11 |
从临时
basic_regex
构造的
regex_token_iterator
会立即失效
|
通过删除重载禁止此类构造 |