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
|
// library can be caught. See svn.boost.org/trac/boost/ticket/3697
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
system_error( error_code ec )
|
explicit system_error( error_code ec )
|
||||||
: std::runtime_error(""), m_error_code(ec) {}
|
: std::runtime_error(""), m_error_code(ec) {}
|
||||||
|
|
||||||
system_error( error_code ec, const std::string & what_arg )
|
system_error( error_code ec, const std::string & what_arg )
|
||||||
@ -46,8 +46,8 @@ namespace boost
|
|||||||
|
|
||||||
virtual ~system_error() BOOST_NOEXCEPT_OR_NOTHROW {}
|
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;
|
const char * what() const BOOST_NOEXCEPT_OR_NOTHROW;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
error_code m_error_code;
|
error_code m_error_code;
|
||||||
|
Reference in New Issue
Block a user