为什么下面的代码输出“未知错误”?我期望其他一些消息,如“操作超时”或其他描述性错误。升压系统类型为errc :: timed_out的make_error_code的消息为“未知错误”
操作系统:Windows 7 升压:1.57
#include <iostream>
#include "boost/system/system_error.hpp"
void main()
{
boost::system::error_code ec = make_error_code(boost::system::errc::timed_out);
auto message = ec.message();
std::cout << message << std::endl;
}
请发布最少的完整示例。这意味着我可以编译而不必猜测。 –
代码更新 - 感谢您的建议 – klmurphy72