Reverting member function pointer optimization

[SVN r12580]
This commit is contained in:
Douglas Gregor
2002-01-30 15:04:08 +00:00
parent 6882358627
commit 7b0f465f33
2 changed files with 18 additions and 108 deletions

View File

@ -86,17 +86,13 @@ namespace boost {
* so function requires a union of the two. */
union any_pointer
{
class incomplete;
void* obj_ptr;
const void* const_obj_ptr;
void (*func_ptr)();
void (incomplete::*mem_func_ptr)();
explicit any_pointer(void* p) : obj_ptr(p) {}
explicit any_pointer(const void* p) : const_obj_ptr(p) {}
explicit any_pointer(void (*p)()) : func_ptr(p) {}
explicit any_pointer(void (incomplete::*p)()) : mem_func_ptr(p) {}
};
/**
@ -143,7 +139,7 @@ namespace boost {
function_ptr_tag,
function_obj_tag>::type ptr_or_obj_tag;
typedef typename IF<(is_member_function_pointer<F>::value),
typedef typename IF<(is_member_pointer<F>::value),
member_ptr_tag,
ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag;
@ -160,7 +156,7 @@ namespace boost {
// The trivial manager does nothing but return the same pointer (if we
// are cloning) or return the null pointer (if we are deleting).
inline any_pointer trivial_manager(any_pointer f,
functor_manager_operation_type op)
functor_manager_operation_type op)
{
if (op == clone_functor_tag)
return f;