====== copy_if ====== template OutputIterator copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred) { for( ; first != last; first++) { if(pred(*first)) *result++ = *first; } return result; }