S
SpOiLeR
I have function
bool IsGood (const std::string& sr);
I want to use that function in std::not1 STL functor. I tried this:
not1(IsGood)
/*
error : 'std::unary_negate<_Fn1> std::not1(const _Fn1 &)' : could not
deduce template argument for 'overloaded function type' from 'overloaded
function type'
error: 'std::unary_negate<_Fn1> std::not1(const _Fn1 &)' : could not deduce
template argument for 'overloaded function type' from 'overloaded function
type'
*/
and this
not1(ptr_fun(IsGood))
/*
functional(209): warning : qualifier applied to reference type; ignored
functional(209): error : '_Left' : reference to reference is illegal
*/
both don't work and I don't understand why. Please help.
TIA
bool IsGood (const std::string& sr);
I want to use that function in std::not1 STL functor. I tried this:
not1(IsGood)
/*
error : 'std::unary_negate<_Fn1> std::not1(const _Fn1 &)' : could not
deduce template argument for 'overloaded function type' from 'overloaded
function type'
error: 'std::unary_negate<_Fn1> std::not1(const _Fn1 &)' : could not deduce
template argument for 'overloaded function type' from 'overloaded function
type'
*/
and this
not1(ptr_fun(IsGood))
/*
functional(209): warning : qualifier applied to reference type; ignored
functional(209): error : '_Left' : reference to reference is illegal
*/
both don't work and I don't understand why. Please help.
TIA