mirror of
https://github.com/boostorg/system.git
synced 2025-05-12 13:41:46 +00:00
Remove uses of BOOST_NOEXCEPT
This commit is contained in:
parent
128fd9341f
commit
abbfd46517
@ -20,7 +20,7 @@
|
||||
// BOOST_SYSTEM_NOEXCEPT
|
||||
// Retained for backward compatibility
|
||||
|
||||
#define BOOST_SYSTEM_NOEXCEPT BOOST_NOEXCEPT
|
||||
#define BOOST_SYSTEM_NOEXCEPT noexcept
|
||||
|
||||
// BOOST_SYSTEM_HAS_CONSTEXPR
|
||||
|
||||
|
@ -84,41 +84,41 @@ protected:
|
||||
|
||||
~error_category() = default;
|
||||
|
||||
constexpr error_category() BOOST_NOEXCEPT: id_( 0 ), stdcat_(), sc_init_()
|
||||
constexpr error_category() noexcept: id_( 0 ), stdcat_(), sc_init_()
|
||||
{
|
||||
}
|
||||
|
||||
explicit constexpr error_category( boost::ulong_long_type id ) BOOST_NOEXCEPT: id_( id ), stdcat_(), sc_init_()
|
||||
explicit constexpr error_category( boost::ulong_long_type id ) noexcept: id_( id ), stdcat_(), sc_init_()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
virtual const char * name() const BOOST_NOEXCEPT = 0;
|
||||
virtual const char * name() const noexcept = 0;
|
||||
|
||||
virtual error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT;
|
||||
virtual bool equivalent( int code, const error_condition & condition ) const BOOST_NOEXCEPT;
|
||||
virtual bool equivalent( const error_code & code, int condition ) const BOOST_NOEXCEPT;
|
||||
virtual error_condition default_error_condition( int ev ) const noexcept;
|
||||
virtual bool equivalent( int code, const error_condition & condition ) const noexcept;
|
||||
virtual bool equivalent( const error_code & code, int condition ) const noexcept;
|
||||
|
||||
virtual std::string message( int ev ) const = 0;
|
||||
virtual char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT;
|
||||
virtual char const * message( int ev, char * buffer, std::size_t len ) const noexcept;
|
||||
|
||||
virtual bool failed( int ev ) const BOOST_NOEXCEPT
|
||||
virtual bool failed( int ev ) const noexcept
|
||||
{
|
||||
return ev != 0;
|
||||
}
|
||||
|
||||
friend BOOST_SYSTEM_CONSTEXPR bool operator==( error_category const & lhs, error_category const & rhs ) BOOST_NOEXCEPT
|
||||
friend BOOST_SYSTEM_CONSTEXPR bool operator==( error_category const & lhs, error_category const & rhs ) noexcept
|
||||
{
|
||||
return rhs.id_ == 0? &lhs == &rhs: lhs.id_ == rhs.id_;
|
||||
}
|
||||
|
||||
friend BOOST_SYSTEM_CONSTEXPR bool operator!=( error_category const & lhs, error_category const & rhs ) BOOST_NOEXCEPT
|
||||
friend BOOST_SYSTEM_CONSTEXPR bool operator!=( error_category const & lhs, error_category const & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
||||
friend BOOST_SYSTEM_CONSTEXPR bool operator<( error_category const & lhs, error_category const & rhs ) BOOST_NOEXCEPT
|
||||
friend BOOST_SYSTEM_CONSTEXPR bool operator<( error_category const & lhs, error_category const & rhs ) noexcept
|
||||
{
|
||||
if( lhs.id_ < rhs.id_ )
|
||||
{
|
||||
|
@ -26,22 +26,22 @@ namespace system
|
||||
|
||||
// error_category default implementation
|
||||
|
||||
inline error_condition error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT
|
||||
inline error_condition error_category::default_error_condition( int ev ) const noexcept
|
||||
{
|
||||
return error_condition( ev, *this );
|
||||
}
|
||||
|
||||
inline bool error_category::equivalent( int code, const error_condition & condition ) const BOOST_NOEXCEPT
|
||||
inline bool error_category::equivalent( int code, const error_condition & condition ) const noexcept
|
||||
{
|
||||
return default_error_condition( code ) == condition;
|
||||
}
|
||||
|
||||
inline bool error_category::equivalent( const error_code & code, int condition ) const BOOST_NOEXCEPT
|
||||
inline bool error_category::equivalent( const error_code & code, int condition ) const noexcept
|
||||
{
|
||||
return code.equals( condition, *this );
|
||||
}
|
||||
|
||||
inline char const * error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
|
||||
inline char const * error_category::message( int ev, char * buffer, std::size_t len ) const noexcept
|
||||
{
|
||||
if( len == 0 )
|
||||
{
|
||||
|
@ -51,14 +51,14 @@ namespace system
|
||||
// and error_code containing a pointer to an object of a type derived
|
||||
// from error_category.
|
||||
|
||||
bool operator==( const error_code & code, const error_condition & condition ) BOOST_NOEXCEPT;
|
||||
bool operator==( const error_code & code, const error_condition & condition ) noexcept;
|
||||
std::size_t hash_value( error_code const & ec );
|
||||
|
||||
class error_code
|
||||
{
|
||||
private:
|
||||
|
||||
friend bool operator==( const error_code & code, const error_condition & condition ) BOOST_NOEXCEPT;
|
||||
friend bool operator==( const error_code & code, const error_condition & condition ) noexcept;
|
||||
friend std::size_t hash_value( error_code const & ec );
|
||||
|
||||
private:
|
||||
@ -84,7 +84,7 @@ private:
|
||||
|
||||
private:
|
||||
|
||||
char const* category_name() const BOOST_NOEXCEPT
|
||||
char const* category_name() const noexcept
|
||||
{
|
||||
// return category().name();
|
||||
|
||||
@ -108,19 +108,19 @@ public:
|
||||
|
||||
// constructors:
|
||||
|
||||
constexpr error_code() BOOST_NOEXCEPT:
|
||||
constexpr error_code() noexcept:
|
||||
d1_(), lc_flags_( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR error_code( int val, const error_category & cat ) BOOST_NOEXCEPT:
|
||||
BOOST_SYSTEM_CONSTEXPR error_code( int val, const error_category & cat ) noexcept:
|
||||
d1_(), lc_flags_( 2 + detail::failed_impl( val, cat ) )
|
||||
{
|
||||
d1_.val_ = val;
|
||||
d1_.cat_ = &cat;
|
||||
}
|
||||
|
||||
error_code( int val, const error_category & cat, source_location const * loc ) BOOST_NOEXCEPT:
|
||||
error_code( int val, const error_category & cat, source_location const * loc ) noexcept:
|
||||
d1_(), lc_flags_( ( loc? reinterpret_cast<boost::uintptr_t>( loc ): 2 ) | +detail::failed_impl( val, cat ) )
|
||||
{
|
||||
d1_.val_ = val;
|
||||
@ -131,12 +131,12 @@ public:
|
||||
typename detail::enable_if<
|
||||
is_error_code_enum<ErrorCodeEnum>::value
|
||||
|| std::is_error_code_enum<ErrorCodeEnum>::value
|
||||
>::type* = 0 ) BOOST_NOEXCEPT: d1_(), lc_flags_( 0 )
|
||||
>::type* = 0 ) noexcept: d1_(), lc_flags_( 0 )
|
||||
{
|
||||
*this = make_error_code( e );
|
||||
}
|
||||
|
||||
error_code( error_code const& ec, source_location const * loc ) BOOST_NOEXCEPT:
|
||||
error_code( error_code const& ec, source_location const * loc ) noexcept:
|
||||
d1_(), lc_flags_( 0 )
|
||||
{
|
||||
*this = ec;
|
||||
@ -147,7 +147,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
error_code( std::error_code const& ec ) BOOST_NOEXCEPT:
|
||||
error_code( std::error_code const& ec ) noexcept:
|
||||
d1_(), lc_flags_( 0 )
|
||||
{
|
||||
#ifndef BOOST_NO_RTTI
|
||||
@ -167,37 +167,37 @@ public:
|
||||
|
||||
// modifiers:
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR void assign( int val, const error_category & cat ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR void assign( int val, const error_category & cat ) noexcept
|
||||
{
|
||||
*this = error_code( val, cat );
|
||||
}
|
||||
|
||||
void assign( int val, const error_category & cat, source_location const * loc ) BOOST_NOEXCEPT
|
||||
void assign( int val, const error_category & cat, source_location const * loc ) noexcept
|
||||
{
|
||||
*this = error_code( val, cat, loc );
|
||||
}
|
||||
|
||||
void assign( error_code const& ec, source_location const * loc ) BOOST_NOEXCEPT
|
||||
void assign( error_code const& ec, source_location const * loc ) noexcept
|
||||
{
|
||||
*this = error_code( ec, loc );
|
||||
}
|
||||
|
||||
template<typename ErrorCodeEnum>
|
||||
BOOST_SYSTEM_CONSTEXPR typename detail::enable_if<is_error_code_enum<ErrorCodeEnum>::value, error_code>::type &
|
||||
operator=( ErrorCodeEnum val ) BOOST_NOEXCEPT
|
||||
operator=( ErrorCodeEnum val ) noexcept
|
||||
{
|
||||
*this = make_error_code( val );
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR void clear() BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR void clear() noexcept
|
||||
{
|
||||
*this = error_code();
|
||||
}
|
||||
|
||||
// observers:
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR int value() const BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR int value() const noexcept
|
||||
{
|
||||
if( lc_flags_ != 1 )
|
||||
{
|
||||
@ -214,7 +214,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR const error_category & category() const BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR const error_category & category() const noexcept
|
||||
{
|
||||
if( lc_flags_ == 0 )
|
||||
{
|
||||
@ -231,7 +231,7 @@ public:
|
||||
}
|
||||
|
||||
// deprecated?
|
||||
error_condition default_error_condition() const BOOST_NOEXCEPT
|
||||
error_condition default_error_condition() const noexcept
|
||||
{
|
||||
return category().default_error_condition( value() );
|
||||
}
|
||||
@ -253,7 +253,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
char const * message( char * buffer, std::size_t len ) const BOOST_NOEXCEPT
|
||||
char const * message( char * buffer, std::size_t len ) const noexcept
|
||||
{
|
||||
if( lc_flags_ == 1 )
|
||||
{
|
||||
@ -284,7 +284,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR bool failed() const BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR bool failed() const noexcept
|
||||
{
|
||||
if( lc_flags_ & 1 )
|
||||
{
|
||||
@ -302,17 +302,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR explicit operator bool() const BOOST_NOEXCEPT // true if error
|
||||
BOOST_SYSTEM_CONSTEXPR explicit operator bool() const noexcept // true if error
|
||||
{
|
||||
return failed();
|
||||
}
|
||||
|
||||
bool has_location() const BOOST_NOEXCEPT
|
||||
bool has_location() const noexcept
|
||||
{
|
||||
return lc_flags_ >= 4;
|
||||
}
|
||||
|
||||
source_location const & location() const BOOST_NOEXCEPT
|
||||
source_location const & location() const noexcept
|
||||
{
|
||||
BOOST_STATIC_CONSTEXPR source_location loc;
|
||||
return lc_flags_ >= 4? *reinterpret_cast<source_location const*>( lc_flags_ &~ static_cast<boost::uintptr_t>( 1 ) ): loc;
|
||||
@ -326,7 +326,7 @@ private:
|
||||
|
||||
friend class error_category;
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR bool equals( int val, error_category const& cat ) const BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR bool equals( int val, error_category const& cat ) const noexcept
|
||||
{
|
||||
if( lc_flags_ == 0 )
|
||||
{
|
||||
@ -347,7 +347,7 @@ public:
|
||||
// the more symmetrical non-member syntax allows enum
|
||||
// conversions work for both rhs and lhs.
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( const error_code & lhs, const error_code & rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( const error_code & lhs, const error_code & rhs ) noexcept
|
||||
{
|
||||
bool s1 = lhs.lc_flags_ == 1;
|
||||
bool s2 = rhs.lc_flags_ == 1;
|
||||
@ -367,7 +367,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator<( const error_code & lhs, const error_code & rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator<( const error_code & lhs, const error_code & rhs ) noexcept
|
||||
{
|
||||
bool s1 = lhs.lc_flags_ == 1;
|
||||
bool s2 = rhs.lc_flags_ == 1;
|
||||
@ -388,27 +388,27 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( const error_code & lhs, const error_code & rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( const error_code & lhs, const error_code & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
||||
inline friend bool operator==( std::error_code const & lhs, error_code const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator==( std::error_code const & lhs, error_code const & rhs ) noexcept
|
||||
{
|
||||
return lhs == static_cast< std::error_code >( rhs );
|
||||
}
|
||||
|
||||
inline friend bool operator==( error_code const & lhs, std::error_code const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator==( error_code const & lhs, std::error_code const & rhs ) noexcept
|
||||
{
|
||||
return static_cast< std::error_code >( lhs ) == rhs;
|
||||
}
|
||||
|
||||
inline friend bool operator!=( std::error_code const & lhs, error_code const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator!=( std::error_code const & lhs, error_code const & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
||||
inline friend bool operator!=( error_code const & lhs, std::error_code const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator!=( error_code const & lhs, std::error_code const & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
@ -416,25 +416,25 @@ public:
|
||||
//
|
||||
|
||||
template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type>
|
||||
inline friend bool operator==( error_code const & lhs, E rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator==( error_code const & lhs, E rhs ) noexcept
|
||||
{
|
||||
return lhs == make_error_condition( rhs );
|
||||
}
|
||||
|
||||
template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type>
|
||||
inline friend bool operator==( E lhs, error_code const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator==( E lhs, error_code const & rhs ) noexcept
|
||||
{
|
||||
return make_error_condition( lhs ) == rhs;
|
||||
}
|
||||
|
||||
template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type>
|
||||
inline friend bool operator!=( error_code const & lhs, E rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator!=( error_code const & lhs, E rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
||||
template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type>
|
||||
inline friend bool operator!=( E lhs, error_code const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator!=( E lhs, error_code const & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
@ -442,47 +442,47 @@ public:
|
||||
//
|
||||
|
||||
template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type>
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( error_code const & lhs, E rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( error_code const & lhs, E rhs ) noexcept
|
||||
{
|
||||
return lhs == make_error_code( rhs );
|
||||
}
|
||||
|
||||
template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type>
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( E lhs, error_code const & rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( E lhs, error_code const & rhs ) noexcept
|
||||
{
|
||||
return make_error_code( lhs ) == rhs;
|
||||
}
|
||||
|
||||
template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type>
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( error_code const & lhs, E rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( error_code const & lhs, E rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
||||
template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type>
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( E lhs, error_code const & rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( E lhs, error_code const & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
||||
#if defined(BOOST_SYSTEM_CLANG_6)
|
||||
|
||||
inline friend bool operator==( error_code const & lhs, std::error_condition const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator==( error_code const & lhs, std::error_condition const & rhs ) noexcept
|
||||
{
|
||||
return static_cast< std::error_code >( lhs ) == rhs;
|
||||
}
|
||||
|
||||
inline friend bool operator==( std::error_condition const & lhs, error_code const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator==( std::error_condition const & lhs, error_code const & rhs ) noexcept
|
||||
{
|
||||
return lhs == static_cast< std::error_code >( rhs );
|
||||
}
|
||||
|
||||
inline friend bool operator!=( error_code const & lhs, std::error_condition const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator!=( error_code const & lhs, std::error_condition const & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
||||
inline friend bool operator!=( std::error_condition const & lhs, error_code const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator!=( std::error_condition const & lhs, error_code const & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
@ -588,7 +588,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
inline bool operator==( const error_code & code, const error_condition & condition ) BOOST_NOEXCEPT
|
||||
inline bool operator==( const error_code & code, const error_condition & condition ) noexcept
|
||||
{
|
||||
if( code.lc_flags_ == 1 )
|
||||
{
|
||||
@ -600,17 +600,17 @@ inline bool operator==( const error_code & code, const error_condition & conditi
|
||||
}
|
||||
}
|
||||
|
||||
inline bool operator==( const error_condition & condition, const error_code & code ) BOOST_NOEXCEPT
|
||||
inline bool operator==( const error_condition & condition, const error_code & code ) noexcept
|
||||
{
|
||||
return code == condition;
|
||||
}
|
||||
|
||||
inline bool operator!=( const error_code & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
|
||||
inline bool operator!=( const error_code & lhs, const error_condition & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
||||
inline bool operator!=( const error_condition & lhs, const error_code & rhs ) BOOST_NOEXCEPT
|
||||
inline bool operator!=( const error_condition & lhs, const error_code & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ private:
|
||||
|
||||
private:
|
||||
|
||||
boost::ulong_long_type cat_id() const BOOST_NOEXCEPT
|
||||
boost::ulong_long_type cat_id() const noexcept
|
||||
{
|
||||
return cat_? cat_->id_: detail::generic_category_id;
|
||||
}
|
||||
@ -59,17 +59,17 @@ public:
|
||||
|
||||
// constructors:
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR error_condition() BOOST_NOEXCEPT:
|
||||
BOOST_SYSTEM_CONSTEXPR error_condition() noexcept:
|
||||
val_( 0 ), cat_( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR error_condition( int val, const error_category & cat ) BOOST_NOEXCEPT:
|
||||
BOOST_SYSTEM_CONSTEXPR error_condition( int val, const error_category & cat ) noexcept:
|
||||
val_( val ), cat_( &cat )
|
||||
{
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR explicit error_condition( boost::system::detail::generic_value_tag vt ) BOOST_NOEXCEPT:
|
||||
BOOST_SYSTEM_CONSTEXPR explicit error_condition( boost::system::detail::generic_value_tag vt ) noexcept:
|
||||
val_( vt.value ), cat_( 0 )
|
||||
{
|
||||
}
|
||||
@ -77,20 +77,20 @@ public:
|
||||
template<class ErrorConditionEnum> BOOST_SYSTEM_CONSTEXPR error_condition( ErrorConditionEnum e,
|
||||
typename detail::enable_if<
|
||||
is_error_condition_enum<ErrorConditionEnum>::value && !boost::system::detail::is_same<ErrorConditionEnum, errc::errc_t>::value
|
||||
>::type* = 0) BOOST_NOEXCEPT
|
||||
>::type* = 0) noexcept
|
||||
{
|
||||
*this = make_error_condition( e );
|
||||
}
|
||||
|
||||
template<class ErrorConditionEnum> BOOST_SYSTEM_CONSTEXPR error_condition( ErrorConditionEnum e,
|
||||
typename detail::enable_if<boost::system::detail::is_same<ErrorConditionEnum, errc::errc_t>::value>::type* = 0) BOOST_NOEXCEPT:
|
||||
typename detail::enable_if<boost::system::detail::is_same<ErrorConditionEnum, errc::errc_t>::value>::type* = 0) noexcept:
|
||||
val_( e ), cat_( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
// modifiers:
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR void assign( int val, const error_category & cat ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR void assign( int val, const error_category & cat ) noexcept
|
||||
{
|
||||
val_ = val;
|
||||
cat_ = &cat;
|
||||
@ -98,13 +98,13 @@ public:
|
||||
|
||||
template<typename ErrorConditionEnum>
|
||||
BOOST_SYSTEM_CONSTEXPR typename detail::enable_if<is_error_condition_enum<ErrorConditionEnum>::value, error_condition>::type &
|
||||
operator=( ErrorConditionEnum val ) BOOST_NOEXCEPT
|
||||
operator=( ErrorConditionEnum val ) noexcept
|
||||
{
|
||||
*this = error_condition( val );
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR void clear() BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR void clear() noexcept
|
||||
{
|
||||
val_ = 0;
|
||||
cat_ = 0;
|
||||
@ -112,12 +112,12 @@ public:
|
||||
|
||||
// observers:
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR int value() const BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR int value() const noexcept
|
||||
{
|
||||
return val_;
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR const error_category & category() const BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR const error_category & category() const noexcept
|
||||
{
|
||||
return cat_? *cat_: generic_category();
|
||||
}
|
||||
@ -134,7 +134,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
char const * message( char * buffer, std::size_t len ) const BOOST_NOEXCEPT
|
||||
char const * message( char * buffer, std::size_t len ) const noexcept
|
||||
{
|
||||
if( cat_ )
|
||||
{
|
||||
@ -146,7 +146,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR bool failed() const BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR bool failed() const noexcept
|
||||
{
|
||||
if( cat_ )
|
||||
{
|
||||
@ -158,7 +158,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR explicit operator bool() const BOOST_NOEXCEPT // true if error
|
||||
BOOST_SYSTEM_CONSTEXPR explicit operator bool() const noexcept // true if error
|
||||
{
|
||||
return failed();
|
||||
}
|
||||
@ -167,7 +167,7 @@ public:
|
||||
// the more symmetrical non-member syntax allows enum
|
||||
// conversions work for both rhs and lhs.
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( const error_condition & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( const error_condition & lhs, const error_condition & rhs ) noexcept
|
||||
{
|
||||
if( lhs.val_ != rhs.val_ )
|
||||
{
|
||||
@ -187,14 +187,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator<( const error_condition & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator<( const error_condition & lhs, const error_condition & rhs ) noexcept
|
||||
{
|
||||
error_category const& lcat = lhs.category();
|
||||
error_category const& rcat = rhs.category();
|
||||
return lcat < rcat || ( lcat == rcat && lhs.val_ < rhs.val_ );
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( const error_condition & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( const error_condition & lhs, const error_condition & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
@ -220,22 +220,22 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
inline friend bool operator==( std::error_code const & lhs, error_condition const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator==( std::error_code const & lhs, error_condition const & rhs ) noexcept
|
||||
{
|
||||
return lhs == static_cast< std::error_condition >( rhs );
|
||||
}
|
||||
|
||||
inline friend bool operator==( error_condition const & lhs, std::error_code const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator==( error_condition const & lhs, std::error_code const & rhs ) noexcept
|
||||
{
|
||||
return static_cast< std::error_condition >( lhs ) == rhs;
|
||||
}
|
||||
|
||||
inline friend bool operator!=( std::error_code const & lhs, error_condition const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator!=( std::error_code const & lhs, error_condition const & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
||||
inline friend bool operator!=( error_condition const & lhs, std::error_code const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator!=( error_condition const & lhs, std::error_code const & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
@ -243,25 +243,25 @@ public:
|
||||
//
|
||||
|
||||
template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type>
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( error_condition const & lhs, E rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( error_condition const & lhs, E rhs ) noexcept
|
||||
{
|
||||
return lhs == make_error_condition( rhs );
|
||||
}
|
||||
|
||||
template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type>
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( E lhs, error_condition const & rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( E lhs, error_condition const & rhs ) noexcept
|
||||
{
|
||||
return make_error_condition( lhs ) == rhs;
|
||||
}
|
||||
|
||||
template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type>
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( error_condition const & lhs, E rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( error_condition const & lhs, E rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
||||
template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type>
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( E lhs, error_condition const & rhs ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( E lhs, error_condition const & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
@ -269,25 +269,25 @@ public:
|
||||
//
|
||||
|
||||
template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type>
|
||||
inline friend bool operator==( error_condition const & lhs, E rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator==( error_condition const & lhs, E rhs ) noexcept
|
||||
{
|
||||
return lhs == make_error_code( rhs );
|
||||
}
|
||||
|
||||
template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type>
|
||||
inline friend bool operator==( E lhs, error_condition const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator==( E lhs, error_condition const & rhs ) noexcept
|
||||
{
|
||||
return make_error_code( lhs ) == rhs;
|
||||
}
|
||||
|
||||
template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type>
|
||||
inline friend bool operator!=( error_condition const & lhs, E rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator!=( error_condition const & lhs, E rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
||||
template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type>
|
||||
inline friend bool operator!=( E lhs, error_condition const & rhs ) BOOST_NOEXCEPT
|
||||
inline friend bool operator!=( E lhs, error_condition const & rhs ) noexcept
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
@ -35,18 +35,18 @@ class BOOST_SYMBOL_VISIBLE generic_error_category: public error_category
|
||||
{
|
||||
public:
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR generic_error_category() BOOST_NOEXCEPT:
|
||||
BOOST_SYSTEM_CONSTEXPR generic_error_category() noexcept:
|
||||
error_category( detail::generic_category_id )
|
||||
{
|
||||
}
|
||||
|
||||
const char * name() const BOOST_NOEXCEPT BOOST_OVERRIDE
|
||||
const char * name() const noexcept BOOST_OVERRIDE
|
||||
{
|
||||
return "generic";
|
||||
}
|
||||
|
||||
std::string message( int ev ) const BOOST_OVERRIDE;
|
||||
char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
|
||||
char const * message( int ev, char * buffer, std::size_t len ) const noexcept BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
|
||||
@ -55,7 +55,7 @@ public:
|
||||
|
||||
// generic_error_category::message
|
||||
|
||||
inline char const * generic_error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
|
||||
inline char const * generic_error_category::message( int ev, char * buffer, std::size_t len ) const noexcept
|
||||
{
|
||||
return generic_error_category_message( ev, buffer, len );
|
||||
}
|
||||
@ -86,7 +86,7 @@ template<class T> constexpr generic_error_category generic_cat_holder<T>::instan
|
||||
|
||||
} // namespace detail
|
||||
|
||||
constexpr error_category const & generic_category() BOOST_NOEXCEPT
|
||||
constexpr error_category const & generic_category() noexcept
|
||||
{
|
||||
return detail::generic_cat_holder<void>::instance;
|
||||
}
|
||||
@ -94,10 +94,10 @@ constexpr error_category const & generic_category() BOOST_NOEXCEPT
|
||||
#else // #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
|
||||
|
||||
#if !defined(__SUNPRO_CC) // trailing __global is not supported
|
||||
inline error_category const & generic_category() BOOST_NOEXCEPT BOOST_SYMBOL_VISIBLE;
|
||||
inline error_category const & generic_category() noexcept BOOST_SYMBOL_VISIBLE;
|
||||
#endif
|
||||
|
||||
inline error_category const & generic_category() BOOST_NOEXCEPT
|
||||
inline error_category const & generic_category() noexcept
|
||||
{
|
||||
static const detail::generic_error_category instance;
|
||||
return instance;
|
||||
|
@ -27,17 +27,17 @@ namespace detail
|
||||
|
||||
// glibc has two incompatible strerror_r definitions
|
||||
|
||||
inline char const * strerror_r_helper( char const * r, char const * ) BOOST_NOEXCEPT
|
||||
inline char const * strerror_r_helper( char const * r, char const * ) noexcept
|
||||
{
|
||||
return r;
|
||||
}
|
||||
|
||||
inline char const * strerror_r_helper( int r, char const * buffer ) BOOST_NOEXCEPT
|
||||
inline char const * strerror_r_helper( int r, char const * buffer ) noexcept
|
||||
{
|
||||
return r == 0? buffer: "Unknown error";
|
||||
}
|
||||
|
||||
inline char const * generic_error_category_message( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
|
||||
inline char const * generic_error_category_message( int ev, char * buffer, std::size_t len ) noexcept
|
||||
{
|
||||
return strerror_r_helper( strerror_r( ev, buffer, len ), buffer );
|
||||
}
|
||||
@ -68,7 +68,7 @@ inline std::string generic_error_category_message( int ev )
|
||||
return m? m: "Unknown error";
|
||||
}
|
||||
|
||||
inline char const * generic_error_category_message( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
|
||||
inline char const * generic_error_category_message( int ev, char * buffer, std::size_t len ) noexcept
|
||||
{
|
||||
if( len == 0 )
|
||||
{
|
||||
|
@ -35,25 +35,25 @@ class BOOST_SYMBOL_VISIBLE interop_error_category: public error_category
|
||||
{
|
||||
public:
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR interop_error_category() BOOST_NOEXCEPT:
|
||||
BOOST_SYSTEM_CONSTEXPR interop_error_category() noexcept:
|
||||
error_category( detail::interop_category_id )
|
||||
{
|
||||
}
|
||||
|
||||
const char * name() const BOOST_NOEXCEPT BOOST_OVERRIDE
|
||||
const char * name() const noexcept BOOST_OVERRIDE
|
||||
{
|
||||
return "std:unknown";
|
||||
}
|
||||
|
||||
std::string message( int ev ) const BOOST_OVERRIDE;
|
||||
char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
|
||||
char const * message( int ev, char * buffer, std::size_t len ) const noexcept BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
inline char const * interop_error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
|
||||
inline char const * interop_error_category::message( int ev, char * buffer, std::size_t len ) const noexcept
|
||||
{
|
||||
detail::snprintf( buffer, len, "Unknown interop error %d", ev );
|
||||
return buffer;
|
||||
@ -79,7 +79,7 @@ template<class T> struct BOOST_SYMBOL_VISIBLE interop_cat_holder
|
||||
template<class T> constexpr interop_error_category interop_cat_holder<T>::instance;
|
||||
#endif
|
||||
|
||||
constexpr error_category const & interop_category() BOOST_NOEXCEPT
|
||||
constexpr error_category const & interop_category() noexcept
|
||||
{
|
||||
return interop_cat_holder<void>::instance;
|
||||
}
|
||||
@ -87,10 +87,10 @@ constexpr error_category const & interop_category() BOOST_NOEXCEPT
|
||||
#else // #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
|
||||
|
||||
#if !defined(__SUNPRO_CC) // trailing __global is not supported
|
||||
inline error_category const & interop_category() BOOST_NOEXCEPT BOOST_SYMBOL_VISIBLE;
|
||||
inline error_category const & interop_category() noexcept BOOST_SYMBOL_VISIBLE;
|
||||
#endif
|
||||
|
||||
inline error_category const & interop_category() BOOST_NOEXCEPT
|
||||
inline error_category const & interop_category() noexcept
|
||||
{
|
||||
static const detail::interop_error_category instance;
|
||||
return instance;
|
||||
|
@ -35,7 +35,7 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
boost::system::error_category const & original_category() const BOOST_NOEXCEPT
|
||||
boost::system::error_category const & original_category() const noexcept
|
||||
{
|
||||
return *pc_;
|
||||
}
|
||||
@ -56,7 +56,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
const char * name() const BOOST_NOEXCEPT BOOST_OVERRIDE
|
||||
const char * name() const noexcept BOOST_OVERRIDE
|
||||
{
|
||||
return pc_->name();
|
||||
}
|
||||
@ -66,13 +66,13 @@ public:
|
||||
return pc_->message( ev );
|
||||
}
|
||||
|
||||
std::error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT BOOST_OVERRIDE
|
||||
std::error_condition default_error_condition( int ev ) const noexcept BOOST_OVERRIDE
|
||||
{
|
||||
return pc_->default_error_condition( ev );
|
||||
}
|
||||
|
||||
inline bool equivalent( int code, const std::error_condition & condition ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
|
||||
inline bool equivalent( const std::error_code & code, int condition ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
|
||||
inline bool equivalent( int code, const std::error_condition & condition ) const noexcept BOOST_OVERRIDE;
|
||||
inline bool equivalent( const std::error_code & code, int condition ) const noexcept BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
@ -26,7 +26,7 @@ namespace system
|
||||
namespace detail
|
||||
{
|
||||
|
||||
inline bool std_category::equivalent( int code, const std::error_condition & condition ) const BOOST_NOEXCEPT
|
||||
inline bool std_category::equivalent( int code, const std::error_condition & condition ) const noexcept
|
||||
{
|
||||
if( condition.category() == *this )
|
||||
{
|
||||
@ -55,7 +55,7 @@ inline bool std_category::equivalent( int code, const std::error_condition & con
|
||||
}
|
||||
}
|
||||
|
||||
inline bool std_category::equivalent( const std::error_code & code, int condition ) const BOOST_NOEXCEPT
|
||||
inline bool std_category::equivalent( const std::error_code & code, int condition ) const noexcept
|
||||
{
|
||||
if( code.category() == *this )
|
||||
{
|
||||
|
@ -34,20 +34,20 @@ class BOOST_SYMBOL_VISIBLE system_error_category: public error_category
|
||||
{
|
||||
public:
|
||||
|
||||
BOOST_SYSTEM_CONSTEXPR system_error_category() BOOST_NOEXCEPT:
|
||||
BOOST_SYSTEM_CONSTEXPR system_error_category() noexcept:
|
||||
error_category( detail::system_category_id )
|
||||
{
|
||||
}
|
||||
|
||||
const char * name() const BOOST_NOEXCEPT BOOST_OVERRIDE
|
||||
const char * name() const noexcept BOOST_OVERRIDE
|
||||
{
|
||||
return "system";
|
||||
}
|
||||
|
||||
error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
|
||||
error_condition default_error_condition( int ev ) const noexcept BOOST_OVERRIDE;
|
||||
|
||||
std::string message( int ev ) const BOOST_OVERRIDE;
|
||||
char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
|
||||
char const * message( int ev, char * buffer, std::size_t len ) const noexcept BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
|
||||
@ -75,7 +75,7 @@ template<class T> constexpr system_error_category system_cat_holder<T>::instance
|
||||
|
||||
} // namespace detail
|
||||
|
||||
constexpr error_category const & system_category() BOOST_NOEXCEPT
|
||||
constexpr error_category const & system_category() noexcept
|
||||
{
|
||||
return detail::system_cat_holder<void>::instance;
|
||||
}
|
||||
@ -83,10 +83,10 @@ constexpr error_category const & system_category() BOOST_NOEXCEPT
|
||||
#else // #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
|
||||
|
||||
#if !defined(__SUNPRO_CC) // trailing __global is not supported
|
||||
inline error_category const & system_category() BOOST_NOEXCEPT BOOST_SYMBOL_VISIBLE;
|
||||
inline error_category const & system_category() noexcept BOOST_SYMBOL_VISIBLE;
|
||||
#endif
|
||||
|
||||
inline error_category const & system_category() BOOST_NOEXCEPT
|
||||
inline error_category const & system_category() noexcept
|
||||
{
|
||||
static const detail::system_error_category instance;
|
||||
return instance;
|
||||
|
@ -25,7 +25,7 @@ namespace system
|
||||
namespace detail
|
||||
{
|
||||
|
||||
inline int system_category_condition_win32( int ev ) BOOST_NOEXCEPT
|
||||
inline int system_category_condition_win32( int ev ) noexcept
|
||||
{
|
||||
// When using the Windows Runtime, most system errors are reported as HRESULTs.
|
||||
// We want to map the common Win32 errors to their equivalent error condition,
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <boost/system/detail/system_category_condition_win32.hpp>
|
||||
|
||||
inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT
|
||||
inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const noexcept
|
||||
{
|
||||
int e2 = system_category_condition_win32( ev );
|
||||
|
||||
@ -41,7 +41,7 @@ inline boost::system::error_condition boost::system::detail::system_error_catego
|
||||
|
||||
#else // #if defined(BOOST_WINDOWS_API)
|
||||
|
||||
inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT
|
||||
inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const noexcept
|
||||
{
|
||||
return error_condition( boost::system::detail::generic_value_tag( ev ) );
|
||||
}
|
||||
@ -53,7 +53,7 @@ inline std::string boost::system::detail::system_error_category::message( int ev
|
||||
return system_error_category_message( ev );
|
||||
}
|
||||
|
||||
inline char const * boost::system::detail::system_error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
|
||||
inline char const * boost::system::detail::system_error_category::message( int ev, char * buffer, std::size_t len ) const noexcept
|
||||
{
|
||||
return system_error_category_message( ev, buffer, len );
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ inline std::string system_error_category_message( int ev )
|
||||
return system_category_message_win32( ev );
|
||||
}
|
||||
|
||||
inline char const * system_error_category_message( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
|
||||
inline char const * system_error_category_message( int ev, char * buffer, std::size_t len ) noexcept
|
||||
{
|
||||
return system_category_message_win32( ev, buffer, len );
|
||||
}
|
||||
@ -57,7 +57,7 @@ inline std::string system_error_category_message( int ev )
|
||||
return generic_error_category_message( ev );
|
||||
}
|
||||
|
||||
inline char const * system_error_category_message( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
|
||||
inline char const * system_error_category_message( int ev, char * buffer, std::size_t len ) noexcept
|
||||
{
|
||||
return generic_error_category_message( ev, buffer, len );
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ inline boost::winapi::UINT_ message_cp_win32()
|
||||
#endif
|
||||
}
|
||||
|
||||
inline char const * system_category_message_win32( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
|
||||
inline char const * system_category_message_win32( int ev, char * buffer, std::size_t len ) noexcept
|
||||
{
|
||||
if( len == 0 )
|
||||
{
|
||||
|
@ -31,19 +31,19 @@ namespace errc
|
||||
{
|
||||
|
||||
// explicit conversion:
|
||||
BOOST_SYSTEM_CONSTEXPR inline error_code make_error_code( errc_t e ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline error_code make_error_code( errc_t e ) noexcept
|
||||
{
|
||||
return error_code( e, generic_category() );
|
||||
}
|
||||
|
||||
// explicit conversion:
|
||||
inline error_code make_error_code( errc_t e, boost::source_location const * loc ) BOOST_NOEXCEPT
|
||||
inline error_code make_error_code( errc_t e, boost::source_location const * loc ) noexcept
|
||||
{
|
||||
return error_code( e, generic_category(), loc );
|
||||
}
|
||||
|
||||
// implicit conversion:
|
||||
BOOST_SYSTEM_CONSTEXPR inline error_condition make_error_condition( errc_t e ) BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR inline error_condition make_error_condition( errc_t e ) noexcept
|
||||
{
|
||||
return error_condition( e, generic_category() );
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
system_error( int ev, error_category const & ecat, char const * prefix ):
|
||||
std::runtime_error( std::string( prefix ) + ": " + error_code( ev, ecat ).what() ), code_( ev, ecat ) {}
|
||||
|
||||
error_code code() const BOOST_NOEXCEPT
|
||||
error_code code() const noexcept
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ class user_category: public sys::error_category
|
||||
{
|
||||
public:
|
||||
|
||||
virtual const char * name() const BOOST_NOEXCEPT
|
||||
virtual const char * name() const noexcept
|
||||
{
|
||||
return "user";
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ class user_category: public sys::error_category
|
||||
{
|
||||
public:
|
||||
|
||||
virtual const char * name() const BOOST_NOEXCEPT
|
||||
virtual const char * name() const noexcept
|
||||
{
|
||||
return "user";
|
||||
}
|
||||
|
@ -13,11 +13,11 @@ struct http_category_impl: public error_category
|
||||
{
|
||||
// clang++ 3.8 and below: initialization of const object
|
||||
// requires a user-provided default constructor
|
||||
BOOST_SYSTEM_CONSTEXPR http_category_impl() BOOST_NOEXCEPT
|
||||
BOOST_SYSTEM_CONSTEXPR http_category_impl() noexcept
|
||||
{
|
||||
}
|
||||
|
||||
char const * name() const BOOST_NOEXCEPT
|
||||
char const * name() const noexcept
|
||||
{
|
||||
return "http";
|
||||
}
|
||||
@ -30,7 +30,7 @@ struct http_category_impl: public error_category
|
||||
return buffer;
|
||||
}
|
||||
|
||||
bool failed( int ev ) const BOOST_NOEXCEPT
|
||||
bool failed( int ev ) const noexcept
|
||||
{
|
||||
return !( ev >= 200 && ev < 300 );
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ class user_category_impl: public boost::system::error_category
|
||||
{
|
||||
public:
|
||||
|
||||
virtual const char * name() const BOOST_NOEXCEPT
|
||||
virtual const char * name() const noexcept
|
||||
{
|
||||
return "user";
|
||||
}
|
||||
@ -113,7 +113,7 @@ public:
|
||||
return buffer;
|
||||
}
|
||||
|
||||
virtual boost::system::error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT
|
||||
virtual boost::system::error_condition default_error_condition( int ev ) const noexcept
|
||||
{
|
||||
if( ev == 4 )
|
||||
{
|
||||
@ -129,7 +129,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool equivalent( int code, const boost::system::error_condition & condition ) const BOOST_NOEXCEPT
|
||||
virtual bool equivalent( int code, const boost::system::error_condition & condition ) const noexcept
|
||||
{
|
||||
if( code == 4 && condition == make_error_condition( boost::system::errc::too_many_files_open_in_system ) )
|
||||
{
|
||||
@ -144,7 +144,7 @@ public:
|
||||
return default_error_condition( code ) == condition;
|
||||
}
|
||||
|
||||
// virtual bool equivalent( const error_code & code, int condition ) const BOOST_NOEXCEPT;
|
||||
// virtual bool equivalent( const error_code & code, int condition ) const noexcept;
|
||||
};
|
||||
|
||||
boost::system::error_category const & user_category()
|
||||
@ -240,7 +240,7 @@ class user2_category_impl: public boost::system::error_category
|
||||
{
|
||||
public:
|
||||
|
||||
virtual const char * name() const BOOST_NOEXCEPT
|
||||
virtual const char * name() const noexcept
|
||||
{
|
||||
return "user2";
|
||||
}
|
||||
@ -253,17 +253,17 @@ public:
|
||||
return buffer;
|
||||
}
|
||||
|
||||
virtual boost::system::error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT
|
||||
virtual boost::system::error_condition default_error_condition( int ev ) const noexcept
|
||||
{
|
||||
return boost::system::error_condition( ev, *this );
|
||||
}
|
||||
|
||||
virtual bool equivalent( int code, const boost::system::error_condition & condition ) const BOOST_NOEXCEPT
|
||||
virtual bool equivalent( int code, const boost::system::error_condition & condition ) const noexcept
|
||||
{
|
||||
return default_error_condition( code ) == condition;
|
||||
}
|
||||
|
||||
virtual bool equivalent( const boost::system::error_code & code, int condition ) const BOOST_NOEXCEPT
|
||||
virtual bool equivalent( const boost::system::error_code & code, int condition ) const noexcept
|
||||
{
|
||||
if( code.category() == *this )
|
||||
{
|
||||
|
@ -19,12 +19,12 @@ class my_category: public boost::system::error_category
|
||||
{
|
||||
public:
|
||||
|
||||
char const* name() const BOOST_NOEXCEPT
|
||||
char const* name() const noexcept
|
||||
{
|
||||
return "mycat";
|
||||
}
|
||||
|
||||
boost::system::error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT
|
||||
boost::system::error_condition default_error_condition( int ev ) const noexcept
|
||||
{
|
||||
switch( ev )
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ class my_category_impl: public std::error_category
|
||||
{
|
||||
public:
|
||||
|
||||
char const* name() const BOOST_NOEXCEPT
|
||||
char const* name() const noexcept
|
||||
{
|
||||
return "mycat";
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ class my_category_impl: public boost::system::error_category
|
||||
{
|
||||
public:
|
||||
|
||||
char const* name() const BOOST_NOEXCEPT
|
||||
char const* name() const noexcept
|
||||
{
|
||||
return "mycat";
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ class user_category: public boost::system::error_category
|
||||
{
|
||||
public:
|
||||
|
||||
virtual const char * name() const BOOST_NOEXCEPT
|
||||
virtual const char * name() const noexcept
|
||||
{
|
||||
return "user";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user