From 51f6cf69fc7926f13012f26124344c6ac5851fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 18 Apr 2023 22:08:26 +0200 Subject: [PATCH] Disable forceinline for clang compilers, see https://lists.boost.org/boost-users/2023/04/91445.php and https://github.com/llvm/llvm-project/issues/62202 --- include/boost/container/detail/workaround.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/boost/container/detail/workaround.hpp b/include/boost/container/detail/workaround.hpp index 64daa0c..77cf463 100644 --- a/include/boost/container/detail/workaround.hpp +++ b/include/boost/container/detail/workaround.hpp @@ -101,8 +101,11 @@ #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_CONTAINER_FORCEINLINE inline -#elif defined(BOOST_GCC) && ((__GNUC__ <= 5) || defined(__MINGW32__)) +#elif defined(BOOST_CLANG) || (defined(BOOST_GCC) && ((__GNUC__ <= 5) || defined(__MINGW32__))) //Older GCCs and MinGw have problems with forceinline + //Clang can have code bloat issues with forceinline, see + //https://lists.boost.org/boost-users/2023/04/91445.php and + //https://github.com/llvm/llvm-project/issues/62202 #define BOOST_CONTAINER_FORCEINLINE inline #else #define BOOST_CONTAINER_FORCEINLINE BOOST_FORCEINLINE