Namespaces
Variants

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

From cppreference.net
Regular expressions library
Classes
(C++11)
Algorithms
Iterators
Exceptions
Traits
Constants
(C++11)
Regex Grammar
ヘッダーで定義 <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 )

目次

パラメータ

other - 別のマッチ結果オブジェクト

戻り値

* this

例外

1) 実装定義の例外をスローする可能性があります。

不具合報告

以下の動作変更の欠陥報告書は、以前に公開されたC++規格に対して遡及的に適用されました。

DR 適用対象 公開時の動作 正しい動作
LWG 2191 C++11 n の事後条件で負の値になる可能性があった 非負の値のみ可能