Boost logo

Boost Users :

From: Hendrik Belitz (hbelitz_at_[hidden])
Date: 2007-08-13 09:43:14


Thanks Peter,

> size_t sum = std::count_if( vec.begin(), vec.end(), !bind(
> &GridCell::is_empty, _1 ) );

Well, for some strange reason I do not see the wood for the trees in this
case.
I do not even thought about using std::count_if. ;)

>Maybe another pair of parentheses will help?
> !((_1 ->* &GridCell::is_empty)())

Doesn't work either, that still produces the same errors. Nevertheless, the
above
solution seems much more readable to me anyway, although I still would like
to know
if this could be also achieved by using boost::lambda in some way.

Regards
 Hendrik

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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