From 8f10d06b9637a67b23a3a11791de5bd6bcd2e112 Mon Sep 17 00:00:00 2001 From: Nikita Kniazev Date: Fri, 3 Apr 2020 18:38:29 +0300 Subject: [PATCH] Fix unused variable warning from BOOST_MPL_ASSERT_* on Clang --- include/boost/mpl/assert.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/mpl/assert.hpp b/include/boost/mpl/assert.hpp index a9fe1c7..67700ab 100644 --- a/include/boost/mpl/assert.hpp +++ b/include/boost/mpl/assert.hpp @@ -53,10 +53,10 @@ #endif // agurt, 10/nov/06: use enums for Borland (which cannot cope with static constants) -// and GCC (which issues "unused variable" warnings when static constants are used +// and GCC/PGI/Clang (which issues "unused variable" warnings when static constants are used // at a function scope) #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x610)) \ - || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0) || defined(__PGI) + || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0) || defined(__PGI) || defined(__clang__) # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr } #else # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr)