I am wondering how to implement what is indicated in the title. I tried something like ...
std::for_each( a.begin(), a.end(), std::mem_fun_ref( &myClass::someFunc ) )
but I get a message that the "term" (I assume that this means the third argument) does not evaluate a function with 1 argument, although it someFunctakes one argument - the type of objects stored in a.
I am wondering if it is possible that I am trying to do using the standard library (I know that I can do this easily using boost).
PS Is there any use for_eachand mem_fun_refperformance implications compared to simply doing it amanually and passing the object in someFunc?
source
share