std::error_condition::operator=
ja.cppreference.net より
template< class ErrorConditionEnum >
error_condition& operator=( ErrorConditionEnum e ) noexcept;
|
(1) | (C++11から) |
error_condition& operator=( const error_condition& other ) = default;
|
(2) | (C++11から) (暗黙に宣言) |
error_condition& operator=( error_condition&& other ) = default;
|
(3) | (C++11から) (暗黙に宣言) |
エラー条件に内容を代入します。
1) 列挙型
e のためのエラー条件を代入します。実質的にmake_error_conditionを呼び出します。これは引数依存の名前探索によってのみeに対して見つけられ、その後*thisをその結果で置き換えます。このオーバーロードは、std::is_error_condition_enum<ErrorConditionEnum>::valueがtrueである場合にのみオーバーロード解決に参加します。2,3) 暗黙に定義されたコピー代入演算子とムーブ代入演算子は、
otherの内容を*thisに代入します。パラメータ
| e | - | エラー状態列挙型 |
| other | - | 代入する別のエラー状態 |
戻り値
* this .
不具合報告
以下の動作変更の欠陥報告書は、以前に公開されたC++規格に対して遡及的に適用されました。
| DR | 適用対象 | 公開時の動作 | 正しい動作 |
|---|---|---|---|
| LWG 3629 | C++11 |
std::make_error_condition
のオーバーロードのみが使用されていた
|
ADLで見つかったオーバーロードが使用される |