00001 00002 00003 #ifndef ML_ALGORITHM_COPY_IF_HPP 00004 #define ML_ALGORITHM_COPY_IF_HPP 00005 00006 namespace ml_algorithm 00007 { 00008 template <class InputIterator, class OutputIterator, class Predicate> 00009 OutputIterator copy_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred) 00010 { 00011 while (first != last) if (pred(*first)) *result++ = *first++; 00012 return result; 00013 } 00014 } 00015 00016 #endif 00017
|
|
Project's page |
Generated on Mon Nov 17 00:23:05 2008 for dmcut2 by 1.5.7
|
