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/foreach.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/foreach.hpp')
-rw-r--r--3rdParty/Boost/src/boost/foreach.hpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/3rdParty/Boost/src/boost/foreach.hpp b/3rdParty/Boost/src/boost/foreach.hpp
index 571b45c..ac2e613 100644
--- a/3rdParty/Boost/src/boost/foreach.hpp
+++ b/3rdParty/Boost/src/boost/foreach.hpp
@@ -17,49 +17,46 @@
// David Jenkins - For help finding a Microsoft Code Analysis bug
// mimomorin@... - For a patch to use rvalue refs on supporting compilers
#ifndef BOOST_FOREACH
// MS compatible compilers support #pragma once
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
#include <cstddef>
#include <utility> // for std::pair
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
// Some compilers let us detect even const-qualified rvalues at compile-time
-#if !defined(BOOST_NO_RVALUE_REFERENCES) \
- || BOOST_WORKAROUND(BOOST_MSVC, >= 1310) && !defined(_PREFAST_) \
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) \
+ || defined(BOOST_MSVC) && !defined(_PREFAST_) \
|| (BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ <= 5) && !defined(BOOST_INTEL) && \
!defined(BOOST_CLANG)) \
|| (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ >= 4) && !defined(BOOST_INTEL) && \
!defined(BOOST_CLANG))
# define BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION
#else
// Some compilers allow temporaries to be bound to non-const references.
// These compilers make it impossible to for BOOST_FOREACH to detect
// temporaries and avoid reevaluation of the collection expression.
-# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
- || BOOST_WORKAROUND(__BORLANDC__, < 0x593) \
+# if BOOST_WORKAROUND(__BORLANDC__, < 0x593) \
|| (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \
|| BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) \
|| BOOST_WORKAROUND(__DECCXX_VER, <= 60590042)
# define BOOST_FOREACH_NO_RVALUE_DETECTION
# endif
// Some compilers do not correctly implement the lvalue/rvalue conversion
// rules of the ternary conditional operator.
# if defined(BOOST_FOREACH_NO_RVALUE_DETECTION) \
|| defined(BOOST_NO_SFINAE) \
|| BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
|| BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(1400)) \
- || BOOST_WORKAROUND(__GNUC__, < 3) \
- || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ <= 2)) \
|| (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ <= 3) && defined(__APPLE_CC__)) \
|| BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) \
|| BOOST_WORKAROUND(__SUNPRO_CC, >= 0x5100) \
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x590))
# define BOOST_FOREACH_NO_CONST_RVALUE_DETECTION
@@ -225,13 +222,13 @@ inline boost::is_const<T> *is_const_(T &) { return 0; }
#ifndef BOOST_FOREACH_NO_RVALUE_DETECTION
template<typename T>
inline boost::mpl::true_ *is_const_(T const &) { return 0; }
#endif
-#ifdef BOOST_NO_RVALUE_REFERENCES
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
template<typename T>
inline boost::mpl::false_ *is_rvalue_(T &, int) { return 0; }
template<typename T>
inline boost::mpl::true_ *is_rvalue_(T const &, ...) { return 0; }
#else
@@ -346,15 +343,13 @@ struct foreach_iterator
//
// To treat the container as a null-terminated string, merely cast it to a
// char const *, as in BOOST_FOREACH( char ch, (char const *)"hello" ) ...
//
// To treat the container as an array, use boost::as_array() in <boost/range/as_array.hpp>,
// as in BOOST_FOREACH( char ch, boost::as_array("hello") ) ...
- #if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
BOOST_MPL_ASSERT_MSG( (!is_char_array<T>::value), IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING, (T&) );
- #endif
// If the type is a pointer to a null terminated string (as opposed
// to an array type), there is no ambiguity.
typedef BOOST_DEDUCED_TYPENAME wrap_cstr<T>::type container;
typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if<
@@ -377,15 +372,13 @@ struct foreach_reverse_iterator
//
// To treat the container as a null-terminated string, merely cast it to a
// char const *, as in BOOST_FOREACH( char ch, (char const *)"hello" ) ...
//
// To treat the container as an array, use boost::as_array() in <boost/range/as_array.hpp>,
// as in BOOST_FOREACH( char ch, boost::as_array("hello") ) ...
- #if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
BOOST_MPL_ASSERT_MSG( (!is_char_array<T>::value), IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING, (T&) );
- #endif
// If the type is a pointer to a null terminated string (as opposed
// to an array type), there is no ambiguity.
typedef BOOST_DEDUCED_TYPENAME wrap_cstr<T>::type container;
typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if<
@@ -456,23 +449,23 @@ inline T &derefof(T *t)
# define BOOST_FOREACH_DEREFOF(T) boost::foreach_detail_::derefof(*T)
#else
# define BOOST_FOREACH_DEREFOF(T) (*T)
#endif
#if defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION) \
- && !defined(BOOST_NO_RVALUE_REFERENCES)
+ && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
///////////////////////////////////////////////////////////////////////////////
// Rvalue references makes it drop-dead simple to detect at compile time
// whether an expression is an rvalue.
///////////////////////////////////////////////////////////////////////////////
# define BOOST_FOREACH_IS_RVALUE(COL) \
boost::foreach_detail_::is_rvalue_((COL), 0)
#elif defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION) \
- && defined(BOOST_NO_RVALUE_REFERENCES)
+ && defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
///////////////////////////////////////////////////////////////////////////////
// Detect at compile-time whether an expression yields an rvalue or
// an lvalue. This is rather non-standard, but some popular compilers
// accept it.
///////////////////////////////////////////////////////////////////////////////
@@ -956,13 +949,13 @@ rderef(auto_any_t cur, type2type<T, C> *)
// Evaluate the collection expression, and detect if it is an lvalue or and rvalue
# define BOOST_FOREACH_EVALUATE(COL) \
(true ? boost::foreach_detail_::make_probe((COL), BOOST_FOREACH_ID(_foreach_is_rvalue)) : (COL))
// The rvalue/lvalue-ness of the collection expression is determined dynamically, unless
-// type type is an array or is noncopyable or is non-const, in which case we know it's an lvalue.
+// the type is an array or is noncopyable or is non-const, in which case we know it's an lvalue.
// If the type happens to be a lightweight proxy, always make a copy.
# define BOOST_FOREACH_SHOULD_COPY(COL) \
(boost::foreach_detail_::should_copy_impl( \
true ? 0 : boost::foreach_detail_::or_( \
boost::foreach_detail_::is_array_(COL) \
, BOOST_FOREACH_IS_NONCOPYABLE(COL) \