15 Sep
2006
15 Sep
'06
4:32 p.m.
struct resize_vector_bool
Should'nt that be
struct resize_vector_bool : public std::binary_function<V,N,void> ?
Thanks Hendrik, it solved the problem though I had to define template parameters. This is the final working version: template <class V, class N> struct resize_vector_bool : public std::binary_function<V,N,void> { void operator()(V& v, N n) const { v.resize(n); } }; std::vector<std::vector<bool> > vec; std::for_each( vec.begin(), vec.end() , boost::bind( resize_vector_bool<std::vector<bool>,int>(), _1, 10)); -- Regards, Alexander. http://sjcomp.com