diff -r 42c833fb1fd5 -r d131deb9d2f4 copy_if.hpp
|
a
|
b
|
|
| 39 | 39 | { |
| 40 | 40 | for ( ; first != last; ++first ) |
| 41 | 41 | if (p(*first)) |
| 42 | | *result++ = first; |
| | 42 | *result++ = *first; |
| 43 | 43 | return result; |
| 44 | 44 | } |
| 45 | 45 | #endif |
| … |
… |
|
| 75 | 75 | OutputIterator result, Predicate p ) |
| 76 | 76 | { |
| 77 | 77 | for ( ; first != last && p(*first); ++first ) |
| 78 | | *result++ = first; |
| | 78 | *result++ = *first; |
| 79 | 79 | return result; |
| 80 | 80 | } |
| 81 | 81 | |
| … |
… |
|
| 109 | 109 | OutputIterator copy_until ( InputIterator first, InputIterator last, OutputIterator result, Predicate p ) |
| 110 | 110 | { |
| 111 | 111 | for ( ; first != last && !p(*first); ++first ) |
| 112 | | *result++ = first; |
| | 112 | *result++ = *first; |
| 113 | 113 | return result; |
| 114 | 114 | } |
| 115 | 115 | |