mirror of
https://github.com/boostorg/system.git
synced 2025-07-30 20:47:14 +02:00
Make system_error(ec) explicit, return by value from system_error::code()
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user