Namespaces
Variants
Views
Actions

std::error_code::assign

From cppreference.com
< cpp‎ | error‎ | error code
 
 
Utilities library
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)
Swap and type operations
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++17)

Elementary string conversions
(C++17)
(C++17)
 
 
 
void assign( int ec, const error_category& ecat ) noexcept;
(since C++11)

Replaces the contents with error code ec and corresponding category ecat.

[edit] Parameters

ec - platform-dependent error code enum to assign
ecat - error category corresponding to ec

[edit] Return value

(none)

[edit] See also

assigns another error code
(public member function) [edit]