diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:41:18 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:43:11 +0900 |
commit | f763a99a501650eff2c60288aa6f10ef916d769e (patch) | |
tree | 02af7e13f9a38c888ebf340fe764cbe7dae99da9 /boost/log/detail/config.hpp | |
parent | 5cde13f21d36c7224b0e13d11c4b49379ae5210d (diff) | |
download | boost-f763a99a501650eff2c60288aa6f10ef916d769e.tar.gz boost-f763a99a501650eff2c60288aa6f10ef916d769e.tar.bz2 boost-f763a99a501650eff2c60288aa6f10ef916d769e.zip |
Imported Upstream version 1.62.0upstream/1.62.0
Change-Id: I9d4c1ddb7b7d8f0069217ecc582700f9fda6dd4c
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/log/detail/config.hpp')
-rw-r--r-- | boost/log/detail/config.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
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 |