- template <class NeedleIterator, class HaystackIterator>
- bool equals_zip(
- NeedleIterator needle_begin, NeedleIterator needle_end,
- HaystackIterator haystack_begin, HaystackIterator haystack_end
- ) {
- while (needle_begin != needle_end) {
- if (haystack_begin == haystack_end)
- return false;
- if (!(*needle_begin == *haystack_begin))
- return false;
- ++needle_begin;
- ++haystack_begin;
- }
- return true;
- }
What do I do when there's no STL algorithm I need
- Post a new comment
- 5 comments
- Post a new comment
- 5 comments