forked from boostorg/function
"contains" -> "target"
[SVN r21845]
This commit is contained in:
@ -330,7 +330,7 @@ namespace boost {
|
||||
bool
|
||||
compare_equal(const Function& f, const Functor& g, mpl::bool_<false>)
|
||||
{
|
||||
if (const Functor* fp = f.template contains<Functor>())
|
||||
if (const Functor* fp = f.template target<Functor>())
|
||||
return *fp == g;
|
||||
else return false;
|
||||
}
|
||||
@ -340,7 +340,7 @@ namespace boost {
|
||||
compare_not_equal(const Function& f, const Functor& g,
|
||||
mpl::bool_<false>)
|
||||
{
|
||||
if (const Functor* fp = f.template contains<Functor>())
|
||||
if (const Functor* fp = f.template target<Functor>())
|
||||
return *fp != g;
|
||||
else return true;
|
||||
}
|
||||
@ -366,7 +366,7 @@ public:
|
||||
bool empty() const { return !manager; }
|
||||
|
||||
template<typename Functor>
|
||||
Functor* contains()
|
||||
Functor* target()
|
||||
{
|
||||
if (!manager) return 0;
|
||||
|
||||
@ -381,7 +381,7 @@ public:
|
||||
}
|
||||
|
||||
template<typename Functor>
|
||||
const Functor* contains() const
|
||||
const Functor* target() const
|
||||
{
|
||||
if (!manager) return 0;
|
||||
|
||||
|
@ -648,7 +648,7 @@ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS ,
|
||||
Allocator>& f,
|
||||
Functor g)
|
||||
{
|
||||
if (const Functor* fp = f.template contains<Functor>()) return *fp == g;
|
||||
if (const Functor* fp = f.template target<Functor>()) return *fp == g;
|
||||
else return false;
|
||||
}
|
||||
|
||||
@ -661,7 +661,7 @@ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS ,
|
||||
BOOST_FUNCTION_TEMPLATE_ARGS ,
|
||||
Allocator>& f)
|
||||
{
|
||||
if (const Functor* fp = f.template contains<Functor>()) return g == *fp;
|
||||
if (const Functor* fp = f.template target<Functor>()) return g == *fp;
|
||||
else return false;
|
||||
}
|
||||
|
||||
@ -674,7 +674,7 @@ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS ,
|
||||
Allocator>& f,
|
||||
Functor g)
|
||||
{
|
||||
if (const Functor* fp = f.template contains<Functor>()) return *fp != g;
|
||||
if (const Functor* fp = f.template target<Functor>()) return *fp != g;
|
||||
else return true;
|
||||
}
|
||||
|
||||
@ -687,7 +687,7 @@ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS ,
|
||||
BOOST_FUNCTION_TEMPLATE_ARGS ,
|
||||
Allocator>& f)
|
||||
{
|
||||
if (const Functor* fp = f.template contains<Functor>()) return g != *fp;
|
||||
if (const Functor* fp = f.template target<Functor>()) return g != *fp;
|
||||
else return true;
|
||||
}
|
||||
#undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL
|
||||
|
Reference in New Issue
Block a user