forked from boostorg/function
function_base.hpp:
function_template.hpp: - Revert to older implementation of has_empty_function (Metrowerks doesn't handle is_base_and_derived correctly) [SVN r13854]
This commit is contained in:
@ -341,20 +341,14 @@ namespace boost {
|
||||
|
||||
namespace detail {
|
||||
namespace function {
|
||||
// The result is not a Boost.Function object, so we assume that this
|
||||
// target is not empty
|
||||
template<typename FunctionObj>
|
||||
inline bool has_empty_target(const FunctionObj&, truth<false>)
|
||||
inline bool has_empty_target(const function_base* f)
|
||||
{
|
||||
return false;
|
||||
return f->empty();
|
||||
}
|
||||
|
||||
// The result is a Boost.Function object, so query whether it is empty
|
||||
// or not
|
||||
template<typename FunctionObj>
|
||||
inline bool has_empty_target(const FunctionObj& f, truth<true>)
|
||||
{
|
||||
return f.empty();
|
||||
inline bool has_empty_target(...)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
} // end namespace function
|
||||
} // end namespace detail
|
||||
|
Reference in New Issue
Block a user