std::error_condition::operator=
From cppreference.com
 
 
 < cpp | error | error condition 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
Utilities library 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
Relational operators (deprecated in C++20) Integer comparison functions  
 
 
 
 Swap and type operations  Common vocabulary types 
(implicitly declared)
 
(implicitly declared)
 
 
 
 
 
 
 
 
 
  Type support (basic types, RTTI)
 Library feature-test macros (C++20)
(C++11)
(C++20)
(C++26)
(C++20)
 Coroutine support (C++20)
 Contract support (C++26)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
  (C++20)(C++20)(C++20)
  (C++20)(C++20)(C++20)
 General utilities
(C++20)(C++20)(C++20)
  (C++20)(C++20)(C++20)
(C++20)
Diagnostics library 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
(until C++20*)
  (C++17)(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
 Exception handling failures
(C++11)
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)
(TM TS)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++23)
(C++23)
(C++26)
(C++26)
(C++26)
std::error_condition 
 
 
 Member functions
error_condition::operator=
 Non-member functions
(until C++20)(until C++20)(C++20)
 Helper classes
template< class ErrorConditionEnum >
error_condition& operator=( ErrorConditionEnum e ) noexcept;
 (1) 
 (since C++11) 
error_condition& operator=( ErrorConditionEnum e ) noexcept;
error_condition& operator=( const error_condition& other ) = default;
 (2) 
 (since C++11) (implicitly declared)
error_condition& operator=( error_condition&& other ) = default;
 (3) 
 (since C++11) (implicitly declared)
Assigns contents to an error condition.
1) Assigns error condition for enum 
e. Effectively calls make_error_condition that is only found by argument-dependent lookup for e and then replaces *this with the result. This overload participates in overload resolution only if std::is_error_condition_enum <ErrorConditionEnum>::value is true.2,3) Implicitly defined copy-assignment operator and move-assignment operator assign the contents of 
other to *this.[edit] Parameters
 e
 -
 error condition enum
 other
 -
 another error condition to assign with
[edit] Return value
*this.
[edit] Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
| DR | Applied to | Behavior as published | Correct behavior | 
|---|---|---|---|
| LWG 3629 | C++11 | only std::make_error_conditionoverloads were used | ADL-found overloads are used |