| 359 | |
| 360 | template<class InputIterator, class Size, class OutputIterator> |
| 361 | OutputIterator copy_n(InputIterator first, Size count, OutputIterator result) |
| 362 | { |
| 363 | for (Size i = 0; i < count; ++i, ++first, ++result) |
| 364 | *result = *first; |
| 365 | |
| 366 | return result; |
| 367 | } |
| 368 | |
| 369 | template<class InputIterator, class OutputIterator, class Predicate> |
| 370 | OutputIterator copy_if(InputIterator first, InputIterator last, |