I don\'t quite get why do we need to make a distinction between error code (std::error_code)
and an error condition(std::error_condition)
, aren\'t they
The simplest answer to this question I found here: http://blog.think-async.com/2010/04/system-error-support-in-c0x-part-5.html.
- class
std::error_code
- represents a specific error value returned by an operation (such as a system call).- class
std::error_condition
- something that you want to test for and, potentially, react to in your code.
I think it is applicable for C++11 too.