From bd91ec02590d75ce474c2c654fe6b422bd50c9b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 4 Jan 2022 00:23:27 +0100 Subject: [PATCH] Increase minimum version for forceinline usage in MSVC as bad code generation was detected in some cases --- include/boost/move/detail/workaround.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/move/detail/workaround.hpp b/include/boost/move/detail/workaround.hpp index 4659484..77e0114 100644 --- a/include/boost/move/detail/workaround.hpp +++ b/include/boost/move/detail/workaround.hpp @@ -52,12 +52,14 @@ #define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG #endif +//#define BOOST_MOVE_DISABLE_FORCEINLINE + #if defined(BOOST_MOVE_DISABLE_FORCEINLINE) #define BOOST_MOVE_FORCEINLINE inline #elif defined(BOOST_MOVE_FORCEINLINE_IS_BOOST_FORCELINE) #define BOOST_MOVE_FORCEINLINE BOOST_FORCEINLINE -#elif defined(BOOST_MSVC) && defined(_DEBUG) - //"__forceinline" and MSVC seems to have some bugs in debug mode +#elif defined(BOOST_MSVC) && (_MSC_VER < 1900 || defined(_DEBUG)) + //"__forceinline" and MSVC seems to have some bugs in old versions and in debug mode #define BOOST_MOVE_FORCEINLINE inline #elif defined(BOOST_GCC) && (__GNUC__ <= 5) //Older GCCs have problems with forceinline