diff --git a/include/boost/function.hpp b/include/boost/function.hpp index bdb2769..1a5cca2 100644 --- a/include/boost/function.hpp +++ b/include/boost/function.hpp @@ -10,8 +10,6 @@ // William Kempf, Jesse Jones and Karl Nelson were all very helpful in the // design of this library. -#include // unary_function, binary_function - #include #include diff --git a/include/boost/function/detail/prologue.hpp b/include/boost/function/detail/prologue.hpp index ab2b323..1ef5f6e 100644 --- a/include/boost/function/detail/prologue.hpp +++ b/include/boost/function/detail/prologue.hpp @@ -11,7 +11,6 @@ #define BOOST_FUNCTION_PROLOGUE_HPP # include # include -# include // unary_function, binary_function # include # include # include diff --git a/include/boost/function/function_base.hpp b/include/boost/function/function_base.hpp index 7165434..ae83343 100644 --- a/include/boost/function/function_base.hpp +++ b/include/boost/function/function_base.hpp @@ -284,8 +284,10 @@ namespace boost { reinterpret_cast(&in_buffer.data); new ((void*)&out_buffer.data) functor_type(*in_functor); } else if (op == destroy_functor_tag) { + functor_type* out_functor = + reinterpret_cast(&out_buffer.data); // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type. - reinterpret_cast(&out_buffer.data)->~Functor(); + out_functor->~Functor(); } else /* op == check_functor_type_tag */ { const std::type_info& check_type = *static_cast(out_buffer.const_obj_ptr); diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index 321bd13..3aacea1 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -446,17 +446,6 @@ namespace boost { typename Allocator = BOOST_FUNCTION_DEFAULT_ALLOCATOR > class BOOST_FUNCTION_FUNCTION : public function_base - -#if BOOST_FUNCTION_NUM_ARGS == 1 - - , public std::unary_function - -#elif BOOST_FUNCTION_NUM_ARGS == 2 - - , public std::binary_function - -#endif - { public: #ifndef BOOST_NO_VOID_RETURNS