From 91aeb86f5734800e1bb3426562306d86fcc0082a Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 22 Sep 2018 21:00:06 +0300 Subject: [PATCH] Disable constexpr on g++ 5 --- include/boost/system/detail/config.hpp | 4 ++++ include/boost/system/error_code.hpp | 19 ------------------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/include/boost/system/detail/config.hpp b/include/boost/system/detail/config.hpp index fde93cb..2ad8201 100644 --- a/include/boost/system/detail/config.hpp +++ b/include/boost/system/detail/config.hpp @@ -33,6 +33,10 @@ # define BOOST_SYSTEM_HAS_CONSTEXPR #endif +#if BOOST_WORKAROUND(BOOST_GCC, < 60000) +# undef BOOST_SYSTEM_HAS_CONSTEXPR +#endif + #if defined(BOOST_SYSTEM_HAS_CONSTEXPR) # define BOOST_SYSTEM_CONSTEXPR constexpr #else diff --git a/include/boost/system/error_code.hpp b/include/boost/system/error_code.hpp index c2b1bc0..f413980 100644 --- a/include/boost/system/error_code.hpp +++ b/include/boost/system/error_code.hpp @@ -392,25 +392,6 @@ inline bool failed_impl( int ev, error_category const & cat ) return cat.failed( ev ); } -#elif BOOST_WORKAROUND(BOOST_GCC, < 60000) - -inline bool failed2_impl( int ev, error_category const & cat ) -{ - return cat.failed( ev ); -} - -BOOST_SYSTEM_CONSTEXPR inline bool failed_impl( int ev, error_category const & cat ) -{ - if( cat == system_category() || cat == generic_category() ) - { - return ev != 0; - } - else - { - return failed2_impl( ev, cat ); - } -} - #else BOOST_SYSTEM_CONSTEXPR inline bool failed_impl( int ev, error_category const & cat )