common: fix compilation with older versions of Boost

Due to df0df0f the newer headers require BOOST_NOEXCEPT_OR_NOTHROW to be
defined, which isn't for older versions, e.g. the one used on CentOS 7.
This commit is contained in:
Moritz Bunkus 2015-05-09 11:34:03 +02:00
parent f8b379a0b0
commit d7c90e7f0e

View File

@ -93,6 +93,21 @@ namespace std {
} }
#endif #endif
// mbunkus: older versions of Boost don't know BOOST_NOEXCEPT_OR_NOTHROW.
#if !defined(BOOST_NOEXCEPT_OR_NOTHROW)
# ifdef BOOST_NO_CXX11_NOEXCEPT
# define BOOST_NOEXCEPT
# define BOOST_NOEXCEPT_OR_NOTHROW throw()
# define BOOST_NOEXCEPT_IF(Predicate)
# define BOOST_NOEXCEPT_EXPR(Expression) false
# else
# define BOOST_NOEXCEPT noexcept
# define BOOST_NOEXCEPT_OR_NOTHROW noexcept
# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
# endif
#endif
// maximum lenght of a multibyte string // maximum lenght of a multibyte string
#define MB_LENGTH_MAX 8 #define MB_LENGTH_MAX 8