Make system_error(ec) explicit, return by value from system_error::code()

This commit is contained in:
Peter Dimov
2018-10-03 01:15:43 +03:00
parent d13fa54450
commit 504fb05c2f

View File

@ -24,7 +24,7 @@ namespace boost
// library can be caught. See svn.boost.org/trac/boost/ticket/3697
{
public:
system_error( error_code ec )
explicit system_error( error_code ec )
: std::runtime_error(""), m_error_code(ec) {}
system_error( error_code ec, const std::string & what_arg )
@ -46,7 +46,7 @@ namespace boost
virtual ~system_error() BOOST_NOEXCEPT_OR_NOTHROW {}
const error_code & code() const BOOST_NOEXCEPT_OR_NOTHROW { return m_error_code; }
error_code code() const BOOST_NOEXCEPT { return m_error_code; }
const char * what() const BOOST_NOEXCEPT_OR_NOTHROW;
private: