How is this done in C++0x?
std::vector myv1;
std::transform(myv1.begin(), myv1.end(), myv1.begin(),
std::bind1st(std::multiplies
I'm using VS2012 which support the C++11 bind adaptor. To bind the first element of the binary function (as bind1st use to do) you need to add an _1 (placeholder argument). Need to include the functional for bind.
using namespace std::placeholders;
std::transform( myv1.begin(), myv1.end(), myv1.begin(),
std::bind( std::multiplies(),3,_1));