From e05b199c9fc73f96da8314696990fd1fc1112dad Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Fri, 10 Nov 2006 21:31:19 +0000 Subject: [PATCH] Revert to using enums for GCC, see http://article.gmane.org/gmane.comp.lib.boost.devel/150691 (this does not reintroduce GCC regressions/#29518, the actual fix for them that worked was made in revision 1.13.14.4) [SVN r35997] --- include/boost/mpl/assert.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/mpl/assert.hpp b/include/boost/mpl/assert.hpp index a3d69ef..3d2f0e6 100644 --- a/include/boost/mpl/assert.hpp +++ b/include/boost/mpl/assert.hpp @@ -47,7 +47,11 @@ # define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER #endif -#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +// 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 +// at a function scope) +#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + || (BOOST_MPL_CFG_GCC != 0) # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr } #else # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr)