#ifndef COPY_IFH #define COPY_IFH template OUTPUT copy_if(INPUT first, INPUT last, OUTPUT result, PREDICATE predicate) { for (; first != last; ++first) { if (predicate(*first)) { *result = *first; ++result; } } return result; } #endif