Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
My modification of std::transform to make it work with a predicate.
Prefer algorithms over hand-written loops [1-3]. View Exercise #9: No for-loops to learn how to remove hand-written loops.
Simplified from the STL that ships with C++ Builder 6.0.
//From http://www.richelbilderbeek.nl/CppTransform_if.htm |
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.