std::match_results<BidirIt,Alloc>::operator=
From cppreference.com
< 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) |
目次 |
[編集] パラメータ
| その他 | - | 別の match_results オブジェクト |
[編集] 戻り値
*this
[編集] 例外
1) 実装定義の例外を投げる可能性がある。
[編集] 欠陥報告
以下の動作変更を伴う欠陥報告が、以前に公開されたC++標準に遡って適用されました。
| DR | 適用対象 | 公開された動作 | 正しい動作 |
|---|---|---|---|
| LWG 2191 | C++11 | 後条件で `n` が負になる可能性がある | 非負であることのみ |