From 245f97fc0273f7d6d08771bc3fc79fd883bb4dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 4 Jan 2022 00:24:44 +0100 Subject: [PATCH] Increase minimum version for forceinline usage in MSVC as bad code generation was detected in some cases --- include/boost/interprocess/detail/workaround.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/interprocess/detail/workaround.hpp b/include/boost/interprocess/detail/workaround.hpp index ce927ed..01b6c6e 100644 --- a/include/boost/interprocess/detail/workaround.hpp +++ b/include/boost/interprocess/detail/workaround.hpp @@ -223,8 +223,8 @@ #define BOOST_INTERPROCESS_FORCEINLINE inline #elif defined(BOOST_INTERPROCESS_FORCEINLINE_IS_BOOST_FORCELINE) #define BOOST_INTERPROCESS_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_INTERPROCESS_FORCEINLINE inline #elif defined(BOOST_GCC) && (__GNUC__ <= 5) //Older GCCs have problems with forceinline