От: | Аноним | ||
Дата: | 26.10.05 18:08 | ||
Оценка: |
template<typename ForwardIter,
typename OutputIter, typename UnaryPred>
OutputIter copy_if(ForwardIter begin, ForwardIter end,
OutputIter dest, UnaryPred f) {
while(begin != end) {
if(f(*begin))
*dest++ = *begin;
++begin;
}
template<typename ForwardIter,
typename OutputIter, typename UnaryPred>
OutputIter copy_if(ForwardIter begin, ForwardIter end,
OutputIter dest, UnaryPred f) {
while(begin != end) {
if(f(*begin))
*dest++ = *begin++;
}