forked from boostorg/function
Added contains() and function_equal()
[SVN r22483]
This commit is contained in:
@ -648,7 +648,8 @@ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS ,
|
||||
Allocator>& f,
|
||||
Functor g)
|
||||
{
|
||||
if (const Functor* fp = f.template target<Functor>()) return *fp == g;
|
||||
if (const Functor* fp = f.template target<Functor>())
|
||||
return function_equal(*fp, g);
|
||||
else return false;
|
||||
}
|
||||
|
||||
@ -661,7 +662,8 @@ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS ,
|
||||
BOOST_FUNCTION_TEMPLATE_ARGS ,
|
||||
Allocator>& f)
|
||||
{
|
||||
if (const Functor* fp = f.template target<Functor>()) return g == *fp;
|
||||
if (const Functor* fp = f.template target<Functor>())
|
||||
return function_equal(g, *fp);
|
||||
else return false;
|
||||
}
|
||||
|
||||
@ -674,7 +676,8 @@ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS ,
|
||||
Allocator>& f,
|
||||
Functor g)
|
||||
{
|
||||
if (const Functor* fp = f.template target<Functor>()) return *fp != g;
|
||||
if (const Functor* fp = f.template target<Functor>())
|
||||
return !function_equal(*fp, g);
|
||||
else return true;
|
||||
}
|
||||
|
||||
@ -687,7 +690,8 @@ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS ,
|
||||
BOOST_FUNCTION_TEMPLATE_ARGS ,
|
||||
Allocator>& f)
|
||||
{
|
||||
if (const Functor* fp = f.template target<Functor>()) return g != *fp;
|
||||
if (const Functor* fp = f.template target<Functor>())
|
||||
return !function_equal(g, *fp);
|
||||
else return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user