Index: boost/spirit/home/support/assert_msg.hpp =================================================================== --- boost/spirit/home/support/assert_msg.hpp (revision 83734) +++ boost/spirit/home/support/assert_msg.hpp (working copy) @@ -10,12 +10,21 @@ #pragma once #endif -// Allow to work around the MPL problem in BOOST_MPL_ASSERT_MSG generating -// multiple definition linker errors for certain compilers (VC++) -#if BOOST_SPIRIT_DONT_USE_MPL_ASSERT_MSG != 0 +#include + +// Work around the MPL problem in BOOST_MPL_ASSERT_MSG generating +// multiple definition linker errors for certain compilers (VC++ 8). +// BOOST_SPIRIT_DONT_USE_MPL_ASSERT_MSG can also be defined by user. +#if !defined(BOOST_SPIRIT_DONT_USE_MPL_ASSERT_MSG) +#if defined(BOOST_MSVC) && BOOST_MSVC < 1500 +#define BOOST_SPIRIT_DONT_USE_MPL_ASSERT_MSG 1 +#endif +#endif + +#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || BOOST_SPIRIT_DONT_USE_MPL_ASSERT_MSG != 0 #include #define BOOST_SPIRIT_ASSERT_MSG(Cond, Msg, Types) \ - BOOST_STATIC_ASSERT(Cond) + BOOST_STATIC_ASSERT_MSG(Cond, Msg) #else #include #define BOOST_SPIRIT_ASSERT_MSG(Cond, Msg, Types) \