From bd26d6916c516f40737315b6cb55fdc6f6d64b1e Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Mon, 23 Apr 2018 14:51:15 +0200 Subject: [PATCH] Support boost 1.52 and newer --- flow/libs/system/src/error_code.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/flow/libs/system/src/error_code.cpp b/flow/libs/system/src/error_code.cpp index 2819256a38..3481df8c51 100644 --- a/flow/libs/system/src/error_code.cpp +++ b/flow/libs/system/src/error_code.cpp @@ -15,6 +15,7 @@ // the library is being built (possibly exporting rather than importing code) #define BOOST_SYSTEM_SOURCE +#include #include #include #include @@ -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;