mirror of
https://github.com/boostorg/function.git
synced 2025-07-31 05:17:14 +02:00
Remove unnecessary ifs
This commit is contained in:
@ -129,7 +129,6 @@ namespace boost {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#if BOOST_FUNCTION_NUM_ARGS > 0
|
|
||||||
/* Handle invocation of member pointers. */
|
/* Handle invocation of member pointers. */
|
||||||
template<
|
template<
|
||||||
typename MemberPtr,
|
typename MemberPtr,
|
||||||
@ -165,7 +164,6 @@ namespace boost {
|
|||||||
boost::mem_fn(*f)(static_cast<T&&>(a)...);
|
boost::mem_fn(*f)(static_cast<T&&>(a)...);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename FunctionPtr,
|
typename FunctionPtr,
|
||||||
@ -230,7 +228,6 @@ namespace boost {
|
|||||||
>::type type;
|
>::type type;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if BOOST_FUNCTION_NUM_ARGS > 0
|
|
||||||
/* Retrieve the appropriate invoker for a member pointer. */
|
/* Retrieve the appropriate invoker for a member pointer. */
|
||||||
template<
|
template<
|
||||||
typename MemberPtr,
|
typename MemberPtr,
|
||||||
@ -252,7 +249,6 @@ namespace boost {
|
|||||||
>
|
>
|
||||||
>::type type;
|
>::type type;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Given the tag returned by get_function_tag, retrieve the
|
/* Given the tag returned by get_function_tag, retrieve the
|
||||||
actual invoker that will be used for the given function
|
actual invoker that will be used for the given function
|
||||||
@ -299,7 +295,6 @@ namespace boost {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#if BOOST_FUNCTION_NUM_ARGS > 0
|
|
||||||
/* Retrieve the invoker for a member pointer. */
|
/* Retrieve the invoker for a member pointer. */
|
||||||
template<>
|
template<>
|
||||||
struct get_invoker<member_ptr_tag>
|
struct get_invoker<member_ptr_tag>
|
||||||
@ -332,7 +327,6 @@ namespace boost {
|
|||||||
typedef functor_manager<MemberPtr> manager_type;
|
typedef functor_manager<MemberPtr> manager_type;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Retrieve the invoker for a function object. */
|
/* Retrieve the invoker for a function object. */
|
||||||
template<>
|
template<>
|
||||||
@ -468,7 +462,6 @@ namespace boost {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Member pointers
|
// Member pointers
|
||||||
#if BOOST_FUNCTION_NUM_ARGS > 0
|
|
||||||
template<typename MemberPtr>
|
template<typename MemberPtr>
|
||||||
bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
|
bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
|
||||||
{
|
{
|
||||||
@ -495,7 +488,6 @@ namespace boost {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // BOOST_FUNCTION_NUM_ARGS > 0
|
|
||||||
|
|
||||||
// Function objects
|
// Function objects
|
||||||
// Assign to a function object using the small object optimization
|
// Assign to a function object using the small object optimization
|
||||||
|
Reference in New Issue
Block a user