名稱空間
變體
操作

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

來自 cppreference.com
< 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) 

目錄

[編輯] 引數

其他 - 另一個匹配結果物件

[編輯] 返回值

*this

[編輯] 異常

1) 可能會丟擲實現定義的異常。

[編輯] 缺陷報告

下列更改行為的缺陷報告追溯地應用於以前出版的 C++ 標準。

缺陷報告 應用於 釋出時的行為 正確的行為
LWG 2191 C++11 n 在後置條件中可能為負數 只能是非負數