hi,
i find a std::plus<T> but what if i just want to assign all elements in my container a certain value. Im thinking of something along the lines of
but obviously there is no such thing as std::assign<T>
any tips?
i find a std::plus<T> but what if i just want to assign all elements in my container a certain value. Im thinking of something along the lines of
Code:
std::list<double> List; std::for_each( List.begin(), List.end(), std::bind2nd( std::assign<double>(), 0.0 ) );
any tips?
Comment