Alexander Shyrokov wrote:
struct resize_vector_bool
Should'nt that be
struct resize_vector_bool : public std::binary_function
? Thanks Hendrik, it solved the problem though I had to define template parameters. This is the final working version:
template
struct resize_vector_bool : public std::binary_function { void operator()(V& v, N n) const { v.resize(n); } };
If you want to go this way (there's nothing wrong in practice with using &vector<>::resize IMO), you only need to either: 1. Define result_type: struct resize_vector_bool { typedef void result_type; void operator()(V& v, N n) const { v.resize(n); } }; or 2. Supply it at the bind call by using bind<void>( ... ). This approach avoids having to specify V and N at the bind call.