命名空间
变体
操作

std::match_results<BidirIt,Alloc>::operator=

来自 cppreference.cn
< cpp‎ | regex‎ | match results
 
 
 
正则表达式库
(C++11)
算法
迭代器
异常
特性
常量
(C++11)
正则表达式语法
 
 
定义于头文件 <regex>
match_results& operator=( const match_results& other );
(1)
match_results& operator=( match_results&& other ) noexcept;
(2)

赋值内容。

1) 复制赋值运算符。赋值 other 的内容。
2) 移动赋值运算符。使用移动语义赋值 other 的内容。操作后,other 处于有效但未指定的状态。

给定赋值前 other 的值为 m,且 [0m.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) 

内容

[edit] 参数

other - 另一个 match_results 对象

[edit] 返回值

*this

[edit] 异常

1) 可能抛出实现定义的异常。

[edit] 缺陷报告

以下行为变更缺陷报告被追溯应用于先前发布的 C++ 标准。

DR 应用于 已发布行为 正确行为
LWG 2191 C++11 n 后置条件中 n 可能为负数 只能是非负数