std::error_condition::operator=
From cppreference.com
< cpp | error | error condition
| 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のエラー条件を代入します。これは、eに対してのみ引数依存検索で見つけられるmake_error_conditionを実質的に呼び出し、その結果で*thisを置き換えます。このオーバーロードは、std::is_error_condition_enum<ErrorConditionEnum>::valueがtrueの場合にのみオーバーロード解決に参加します。2,3) 暗黙的に定義されたコピー代入演算子およびムーブ代入演算子は、
otherの内容を*thisに代入します。[編集] パラメータ
| e | - | エラー条件の列挙型 |
| その他 | - | 代入する別のエラー条件 |
[編集] 戻り値
*this.
[編集] 不具合報告
以下の動作変更を伴う欠陥報告が、以前に公開されたC++標準に遡って適用されました。
| DR | 適用対象 | 公開された動作 | 正しい動作 |
|---|---|---|---|
| LWG 3629 | C++11 | std::make_error_conditionのオーバーロードのみが使用されました |
ADLで見つかったオーバーロードが使用されます |