std::match_results<BidirIt,Alloc>::operator=
来自 cppreference.cn
< cpp | regex | match results
在头文件 <regex> 中定义 |
||
match_results& operator=( const match_results& other ); |
(1) | |
match_results& operator=( match_results&& other ) noexcept; |
(2) | |
赋值内容。
1) 复制赋值运算符。赋值 other 的内容。
2) 移动赋值运算符。使用移动语义赋值 other 的内容。操作后 other 处于有效但未指定的状态。
给定赋值前 other 的值为 m,以及 [
0,
m.size())
中的任意整数 n,当赋值完成后,以下成员函数应返回指定值:
成员函数 | 值 |
---|---|
ready()
|
m.ready() |
size()
|
m.size() |
str(n)
|
m.str(n) |
prefix()
|
m.prefix() |
suffix()
|
m.suffix() |
operator[](n)
|
m[n] |
length(n)
|
m.length(n) |
position(n)
|
m.position(n) |
目录 |
[编辑] 参数
其他 | - | 另一个匹配结果对象 |
[编辑] 返回值
*this
[编辑] 异常
1) 可能会抛出实现定义的异常。
[编辑] 缺陷报告
下列更改行为的缺陷报告追溯地应用于以前出版的 C++ 标准。
缺陷报告 | 应用于 | 发布时的行为 | 正确的行为 |
---|---|---|---|
LWG 2191 | C++11 | n 在后置条件中可能为负数 | 只能是非负数 |