Support boost 1.52 and newer
This commit is contained in:
parent
d660c96158
commit
bd26d6916c
|
@ -15,6 +15,7 @@
|
|||
// the library is being built (possibly exporting rather than importing code)
|
||||
#define BOOST_SYSTEM_SOURCE
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/system/config.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
#include <boost/cerrno.hpp>
|
||||
|
@ -35,10 +36,10 @@ using namespace boost::system::errc;
|
|||
# endif
|
||||
# endif
|
||||
|
||||
#if BOOST_VERSION > 105200
|
||||
#define FOUNDATIONDB_NOEXCEPT BOOST_SYSTEM_NOEXCEPT
|
||||
#else
|
||||
#if BOOST_VERSION <= 105200
|
||||
#define FOUNDATIONDB_NOEXCEPT
|
||||
#else
|
||||
#define FOUNDATIONDB_NOEXCEPT BOOST_SYSTEM_NOEXCEPT
|
||||
#endif
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
|
@ -63,7 +64,7 @@ namespace
|
|||
system_error_category(){}
|
||||
const char * name() const FOUNDATIONDB_NOEXCEPT;
|
||||
std::string message( int ev ) const;
|
||||
error_condition default_error_condition( int ev ) const;
|
||||
error_condition default_error_condition( int ev ) const FOUNDATIONDB_NOEXCEPT;
|
||||
};
|
||||
|
||||
// generic_error_category implementation ---------------------------------//
|
||||
|
@ -164,7 +165,7 @@ namespace
|
|||
return "system";
|
||||
}
|
||||
|
||||
error_condition system_error_category::default_error_condition( int ev ) const
|
||||
error_condition system_error_category::default_error_condition( int ev ) const FOUNDATIONDB_NOEXCEPT
|
||||
{
|
||||
switch ( ev )
|
||||
{
|
||||
|
@ -419,13 +420,13 @@ namespace boost
|
|||
// address for comparison purposes
|
||||
# endif
|
||||
|
||||
BOOST_SYSTEM_DECL const error_category & system_category()
|
||||
BOOST_SYSTEM_DECL const error_category & system_category() FOUNDATIONDB_NOEXCEPT
|
||||
{
|
||||
static const system_error_category system_category_const;
|
||||
return system_category_const;
|
||||
}
|
||||
|
||||
BOOST_SYSTEM_DECL const error_category & generic_category()
|
||||
BOOST_SYSTEM_DECL const error_category & generic_category() FOUNDATIONDB_NOEXCEPT
|
||||
{
|
||||
static const generic_error_category generic_category_const;
|
||||
return generic_category_const;
|
||||
|
|
Loading…
Reference in New Issue