David Abrahams <dave <at> boost-consulting.com> writes:
And then there's the minor detail that you're not allowed to take the address of standard library (member) functions... to be technically portable and correct, you need to write a wrapper, e.g.
struct resize_vector_bool { template <class V, class N> void operator()(V& v, N n) const { v.resize(n); } };
and then you can go back to using two arguments:
std::for_each( vec.begin(), vec.end() , boost::bind( resize_vector_bool(), _1, 10));
If I do it the correct way I get: boost_1_33_1\boost\bind.hpp(63) : error C2039: 'result_type' : is not a member of 'Geometry::resize_vector_bool' I've tried to convert it into a function, but it did not help. Why does that happen? Thanks.