Gavin Doughtie on 15 Aug 2003 15:26:05 -0000 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
[ALACPP] bound for success! |
OK, I want to be Arlo and write the following code: for(unsigned int i(0); i < mySourceVect.size(); ++i) { myDestVect.push_back(aTransformationFunction(mySourceVect[i])); }with std::for_each and std::generate and boost::bind. More specifically, ow does one get an iterated element from mySourceVect as the input parameter to a bound functor for std::generate?
Personally, the for loop looks the most compact and obvious, but I'm trying to get these other tools in more widespread use at work.
Sample code, anyone? Gavin _______________________________________________ alacpp mailing list alacpp@xxxxxxxxxxx http://lists.ellipsis.cx/mailman/listinfo/alacpp