diff options
Diffstat (limited to '3rdParty/Boost/src/boost/function')
-rw-r--r-- | 3rdParty/Boost/src/boost/function/function_base.hpp | 14 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/function/function_fwd.hpp | 3 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/function/function_template.hpp | 16 |
3 files changed, 13 insertions, 20 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 @@ -53,27 +53,27 @@ #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 @@ -658,17 +658,13 @@ public: 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; @@ -680,17 +676,13 @@ public: 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; } } diff --git a/3rdParty/Boost/src/boost/function/function_fwd.hpp b/3rdParty/Boost/src/boost/function/function_fwd.hpp index fb318c9..e79b504 100644 --- a/3rdParty/Boost/src/boost/function/function_fwd.hpp +++ b/3rdParty/Boost/src/boost/function/function_fwd.hpp @@ -16,14 +16,13 @@ // boost::function class template. namespace boost { namespace python { namespace objects { class function; }}} #endif -#if defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - || defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \ +#if defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \ || !(defined(BOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540) # define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX #endif namespace boost { class bad_function_call; diff --git a/3rdParty/Boost/src/boost/function/function_template.hpp b/3rdParty/Boost/src/boost/function/function_template.hpp index f9699d0..72b7fab 100644 --- a/3rdParty/Boost/src/boost/function/function_template.hpp +++ b/3rdParty/Boost/src/boost/function/function_template.hpp @@ -674,13 +674,13 @@ namespace boost { typedef boost::detail::function::BOOST_FUNCTION_VTABLE< R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS> vtable_type; vtable_type* get_vtable() const { return reinterpret_cast<vtable_type*>( - reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01)); + reinterpret_cast<std::size_t>(vtable) & ~static_cast<std::size_t>(0x01)); } struct clear_type {}; public: BOOST_STATIC_CONSTANT(int, args = BOOST_FUNCTION_NUM_ARGS); @@ -746,13 +746,13 @@ namespace boost { BOOST_FUNCTION_FUNCTION(const BOOST_FUNCTION_FUNCTION& f) : function_base() { this->assign_to_own(f); } -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base() { this->move_assign(f); } #endif @@ -835,13 +835,13 @@ namespace boost { BOOST_RETHROW; } BOOST_CATCH_END return *this; } -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES // Move assignment from another BOOST_FUNCTION_FUNCTION BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f) { if (&f == this) return *this; @@ -932,16 +932,17 @@ namespace boost { // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/. static const vtable_type stored_vtable = { { &manager_type::manage }, &invoker_type::invoke }; if (stored_vtable.assign_to(f, functor)) { std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base); + // coverity[pointless_expression]: suppress coverity warnings on apparant if(const). if (boost::has_trivial_copy_constructor<Functor>::value && boost::has_trivial_destructor<Functor>::value && detail::function::function_allows_small_object_optimization<Functor>::value) - value |= static_cast<size_t>(0x01); + value |= static_cast<std::size_t>(0x01); vtable = reinterpret_cast<detail::function::vtable_base *>(value); } else vtable = 0; } template<typename Functor,typename Allocator> @@ -966,12 +967,13 @@ namespace boost { // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/. static const vtable_type stored_vtable = { { &manager_type::manage }, &invoker_type::invoke }; if (stored_vtable.assign_to_a(f, functor, a)) { std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base); + // coverity[pointless_expression]: suppress coverity warnings on apparant if(const). if (boost::has_trivial_copy_constructor<Functor>::value && boost::has_trivial_destructor<Functor>::value && detail::function::function_allows_small_object_optimization<Functor>::value) value |= static_cast<std::size_t>(0x01); vtable = reinterpret_cast<detail::function::vtable_base *>(value); } else @@ -1087,25 +1089,25 @@ public: #endif function(const self_type& f) : base_type(static_cast<const base_type&>(f)){} function(const base_type& f) : base_type(static_cast<const base_type&>(f)){} -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES // Move constructors function(self_type&& f): base_type(static_cast<base_type&&>(f)){} function(base_type&& f): base_type(static_cast<base_type&&>(f)){} #endif self_type& operator=(const self_type& f) { self_type(f).swap(*this); return *this; } -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES self_type& operator=(self_type&& f) { self_type(static_cast<self_type&&>(f)).swap(*this); return *this; } #endif @@ -1136,13 +1138,13 @@ public: self_type& operator=(const base_type& f) { self_type(f).swap(*this); return *this; } -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES self_type& operator=(base_type&& f) { self_type(static_cast<base_type&&>(f)).swap(*this); return *this; } #endif |