Namespaces
Variants

std::error_condition:: operator=

From cppreference.net
Utilities library
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 に対する ADL によってのみ見つかる make_error_condition を呼び出し、その後 * 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で見つかったオーバーロードが使用される