Example #1
0
	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);
	}
Example #2
0
int main()
{
    const std::error_condition ec(6, std::generic_category());
    assert(ec.message() == std::generic_category().message(6));
}