Boost logo

Boost Users :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-07-16 19:06:11


AMDG

Michiel Helvensteijn wrote:
> BOOST_CHECK_PREDICATE( neg(foo), (2) );
>
> Which gives a similar (though less unresolved) error-message:
>
> error: no matching function for call to 'neg(bool (&)(int))'
>

neg(&foo) might work better.

>> The solution is to add a cast:
>> static_cast<bool(*)(const std::string&)(&is<int>)>
>>
>
> Hm. That's not exactly pretty. I'd rather use boost::bind itself on the call
> site. I was hoping to be able to fix something in the definition of neg
> instead.
>

Does it work if you make the argument to neg bool (*f)(const std::string&)?

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net