From f763a99a501650eff2c60288aa6f10ef916d769e Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 6 Oct 2016 10:41:18 +0900 Subject: Imported Upstream version 1.62.0 Change-Id: I9d4c1ddb7b7d8f0069217ecc582700f9fda6dd4c Signed-off-by: DongHun Kwak --- boost/log/detail/config.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'boost/log/detail/config.hpp') diff --git a/boost/log/detail/config.hpp b/boost/log/detail/config.hpp index ce9aeb2dc1..7265d2b6e4 100644 --- a/boost/log/detail/config.hpp +++ b/boost/log/detail/config.hpp @@ -134,6 +134,16 @@ #define BOOST_LOG_NO_CXX11_ARG_PACKS_TO_NON_VARIADIC_ARGS_EXPANSION #endif +#if defined(BOOST_NO_CXX11_CONSTEXPR) || (defined(BOOST_GCC) && ((BOOST_GCC+0) / 100) <= 406) +// GCC 4.6 does not support in-class brace initializers for static constexpr array members +#define BOOST_LOG_NO_CXX11_CONSTEXPR_DATA_MEMBER_BRACE_INITIALIZERS +#endif + +#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_GCC) && ((BOOST_GCC+0) / 100) <= 406) +// GCC 4.6 cannot handle a defaulted function with noexcept specifier +#define BOOST_LOG_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS +#endif + #if defined(_MSC_VER) # define BOOST_LOG_NO_VTABLE __declspec(novtable) #elif defined(__GNUC__) @@ -168,6 +178,14 @@ # define BOOST_LOG_UNREACHABLE_RETURN(r) BOOST_LOG_UNREACHABLE() #endif +// The macro efficiently returns a local lvalue from a function. +// It employs NRVO, if supported by compiler, or uses a move constructor otherwise. +#if defined(BOOST_HAS_NRVO) +#define BOOST_LOG_NRVO_RESULT(x) x +#else +#define BOOST_LOG_NRVO_RESULT(x) boost::move(x) +#endif + // Some compilers support a special attribute that shows that a function won't return #if defined(__GNUC__) || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x590) // GCC and Sun Studio 12 support attribute syntax -- cgit v1.2.3