|
Boost Users : |
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2008-07-18 07:32:42
<joaquin <at> tid.es> writes:
> With Boost.Bind, however, the same trick does not work:
>
> std::for_each(
> functors.begin(), functors.end(),
> boost::bind(::_1));
>
> This does not invoke operator() on the functor objects.
For Boost.Bind there is boost::apply.
#include "boost/bind/apply.hpp"
for_each(f.begin(), f.end(), bind(apply<void>(), _1));
Roman Perepelitsa.
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