summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/spirit/home/support/assert_msg.hpp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip
swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0. Updated our update.sh script to stop on error. Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to missing include of <iostream> with newer Boost. Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/spirit/home/support/assert_msg.hpp')
-rw-r--r--3rdParty/Boost/src/boost/spirit/home/support/assert_msg.hpp35
1 files changed, 29 insertions, 6 deletions
diff --git a/3rdParty/Boost/src/boost/spirit/home/support/assert_msg.hpp b/3rdParty/Boost/src/boost/spirit/home/support/assert_msg.hpp
index db36072..f1433da 100644
--- a/3rdParty/Boost/src/boost/spirit/home/support/assert_msg.hpp
+++ b/3rdParty/Boost/src/boost/spirit/home/support/assert_msg.hpp
@@ -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) \
@@ -24,8 +33,22 @@
#define BOOST_SPIRIT_ASSERT_MATCH(Domain, Expr) \
BOOST_SPIRIT_ASSERT_MSG(( \
- boost::spirit::traits::matches<Domain, Expr>::value \
+ boost::spirit::traits::matches< Domain, Expr >::value \
), error_invalid_expression, (Expr))
+// GCC 4.7 will overeagerly instantiate static_asserts in template functions,
+// if the assert condition does not depend on template parameters
+// (see https://svn.boost.org/trac/boost/ticket/8381).
+// There are places where we want to use constant false as the condition in
+// template functions to indicate that these function overloads should never
+// be called. This allows to generate better error messages. To solve this
+// problem we make the condition dependent on the template argument and use
+// the following macro in such places.
+#include <boost/type_traits/is_same.hpp>
+
+#define BOOST_SPIRIT_ASSERT_FAIL(TemplateParam, Msg, Types) \
+ BOOST_SPIRIT_ASSERT_MSG((!boost::is_same< \
+ TemplateParam, TemplateParam >::value), Msg, Types)
+
#endif