diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) |
commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/function/function_base.hpp | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-contrib-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/function/function_base.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/function/function_base.hpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/3rdParty/Boost/src/boost/function/function_base.hpp b/3rdParty/Boost/src/boost/function/function_base.hpp index 78b7dd1..f3663d7 100644 --- a/3rdParty/Boost/src/boost/function/function_base.hpp +++ b/3rdParty/Boost/src/boost/function/function_base.hpp @@ -24,85 +24,85 @@ #include <boost/type_traits/is_const.hpp> #include <boost/type_traits/is_integral.hpp> #include <boost/type_traits/is_volatile.hpp> #include <boost/type_traits/composite_traits.hpp> #include <boost/type_traits/ice.hpp> #include <boost/ref.hpp> #include <boost/mpl/if.hpp> #include <boost/detail/workaround.hpp> #include <boost/type_traits/alignment_of.hpp> #ifndef BOOST_NO_SFINAE # include "boost/utility/enable_if.hpp" #else # include "boost/mpl/bool.hpp" #endif #include <boost/function_equal.hpp> #include <boost/function/function_fwd.hpp> #if defined(BOOST_MSVC) # pragma warning( push ) # pragma warning( disable : 4793 ) // complaint about native code generation # pragma warning( disable : 4127 ) // "conditional expression is constant" #endif // Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info. #ifdef BOOST_NO_STD_TYPEINFO // Embedded VC++ does not have type_info in namespace std # define BOOST_FUNCTION_STD_NS #else # define BOOST_FUNCTION_STD_NS std #endif // Borrowed from Boost.Python library: determines the cases where we // need to use std::type_info::name to compare instead of operator==. #if defined( BOOST_NO_TYPEID ) # define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) -#elif (defined(__GNUC__) && __GNUC__ >= 3) \ +#elif defined(__GNUC__) \ || defined(_AIX) \ || ( defined(__sgi) && defined(__host_mips)) # include <cstring> # define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) \ (std::strcmp((X).name(),(Y).name()) == 0) # else # define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) #endif -#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 || defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG) +#if defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG) # define BOOST_FUNCTION_TARGET_FIX(x) x #else # define BOOST_FUNCTION_TARGET_FIX(x) -#endif // not MSVC +#endif // __ICL etc #if !BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) # define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \ typename ::boost::enable_if_c<(::boost::type_traits::ice_not< \ (::boost::is_integral<Functor>::value)>::value), \ Type>::type #else // BCC doesn't recognize this depends on a template argument and complains // about the use of 'typename' # define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \ ::boost::enable_if_c<(::boost::type_traits::ice_not< \ (::boost::is_integral<Functor>::value)>::value), \ Type>::type #endif namespace boost { namespace detail { namespace function { class X; /** * A buffer used to store small function objects in * boost::function. It is a union containing function pointers, * object pointers, and a structure that resembles a bound * member function pointer. */ union function_buffer { // For pointers to function objects mutable void* obj_ptr; // For pointers to std::type_info objects struct type_t { // (get_functor_type_tag, check_functor_type_tag). const detail::sp_typeinfo* type; @@ -629,97 +629,89 @@ namespace boost { */ class function_base { public: function_base() : vtable(0) { } /** Determine if the function is empty (i.e., has no target). */ bool empty() const { return !vtable; } /** Retrieve the type of the stored function object, or BOOST_SP_TYPEID(void) if this is empty. */ const detail::sp_typeinfo& target_type() const { if (!vtable) return BOOST_SP_TYPEID(void); detail::function::function_buffer type; get_vtable()->manager(functor, type, detail::function::get_functor_type_tag); return *type.type.type; } template<typename Functor> Functor* target() { if (!vtable) return 0; detail::function::function_buffer type_result; type_result.type.type = &BOOST_SP_TYPEID(Functor); type_result.type.const_qualified = is_const<Functor>::value; type_result.type.volatile_qualified = is_volatile<Functor>::value; get_vtable()->manager(functor, type_result, detail::function::check_functor_type_tag); return static_cast<Functor*>(type_result.obj_ptr); } template<typename Functor> -#if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300) - const Functor* target( Functor * = 0 ) const -#else const Functor* target() const -#endif { if (!vtable) return 0; detail::function::function_buffer type_result; type_result.type.type = &BOOST_SP_TYPEID(Functor); type_result.type.const_qualified = true; type_result.type.volatile_qualified = is_volatile<Functor>::value; get_vtable()->manager(functor, type_result, detail::function::check_functor_type_tag); // GCC 2.95.3 gets the CV qualifiers wrong here, so we // can't do the static_cast that we should do. return static_cast<const Functor*>(type_result.obj_ptr); } template<typename F> bool contains(const F& f) const { -#if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300) - if (const F* fp = this->target( (F*)0 )) -#else if (const F* fp = this->template target<F>()) -#endif { return function_equal(*fp, f); } else { return false; } } #if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3 // GCC 3.3 and newer cannot copy with the global operator==, due to // problems with instantiation of function return types before it // has been verified that the argument types match up. template<typename Functor> BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator==(Functor g) const { if (const Functor* fp = target<Functor>()) return function_equal(*fp, g); else return false; } template<typename Functor> BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator!=(Functor g) const { if (const Functor* fp = target<Functor>()) return !function_equal(*fp, g); else return true; } #endif public: // should be protected, but GCC 2.95.3 will fail to allow access detail::function::vtable_base* get_vtable() const { return reinterpret_cast<detail::function::vtable_base*>( reinterpret_cast<std::size_t>(vtable) & ~static_cast<std::size_t>(0x01)); } |