Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83738 - trunk/boost/spirit/home/support
From: hartmut.kaiser_at_[hidden]
Date: 2013-04-03 09:13:13


Author: hkaiser
Date: 2013-04-03 09:13:12 EDT (Wed, 03 Apr 2013)
New Revision: 83738
URL: http://svn.boost.org/trac/boost/changeset/83738

Log:
Spirit: fix #8361: Linking problems with MSVC
Text files modified:
   trunk/boost/spirit/home/support/assert_msg.hpp | 19 ++++++++++++++-----
   1 files changed, 14 insertions(+), 5 deletions(-)

Modified: trunk/boost/spirit/home/support/assert_msg.hpp
==============================================================================
--- trunk/boost/spirit/home/support/assert_msg.hpp (original)
+++ trunk/boost/spirit/home/support/assert_msg.hpp 2013-04-03 09:13:12 EDT (Wed, 03 Apr 2013)
@@ -1,4 +1,4 @@
-// Copyright (c) 2001-2011 Hartmut Kaiser
+// Copyright (c) 2001-2013 Hartmut Kaiser
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -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 <boost/config.hpp>
+
+// 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 <boost/static_assert.hpp>
 #define BOOST_SPIRIT_ASSERT_MSG(Cond, Msg, Types) \
- BOOST_STATIC_ASSERT(Cond)
+ BOOST_STATIC_ASSERT_MSG(Cond, Msg)
 #else
 #include <boost/mpl/assert.hpp>
 #define BOOST_SPIRIT_ASSERT_MSG(Cond, Msg, Types) \


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk