int main() { { const std::error_condition ec1 = std::make_error_condition(std::io_errc::stream); assert(ec1.value() == static_cast<int>(std::io_errc::stream)); assert(ec1.category() == std::iostream_category()); } }
std::error_condition windows_category_impl::default_error_condition(int error_code) const { const std::error_condition err_condition = std::system_category().default_error_condition(error_code); const std::string err_condition_msg = err_condition.message(); if (_stricmp(err_condition_msg.c_str(), "unknown error") != 0) { return err_condition; } return std::error_condition(error_code, *this); }
int main() { const std::error_condition ec(6, std::generic_category()); assert(ec.message() == std::generic_category().message(6)); }
TestCondition(std::error_condition const & err) noexcept : std::error_condition(err.value(), err.category()), error(err.value()), cat(err.category()) { }