350,7 → 350,6 |
|
template <typename IteratorImpl> |
class BaseIterator |
: public std::iterator<std::forward_iterator_tag, Curve const> |
{ |
public: |
BaseIterator() {} |
358,6 → 357,12 |
// default construct |
// default copy |
|
using iterator_category = std::forward_iterator_tag; |
using value_type = Curve const; |
using difference_type = ptrdiff_t; |
using pointer = Curve const*; |
using reference = Curve const&; |
|
bool operator==(BaseIterator const &other) { |
return other.impl_ == impl_; |
} |
388,12 → 393,17 |
|
template <typename Iterator> |
class DuplicatingIterator |
: public std::iterator<std::input_iterator_tag, Curve *> |
{ |
public: |
DuplicatingIterator() {} |
DuplicatingIterator(Iterator const &iter) : impl_(iter) {} |
|
using iterator_category = std::input_iterator_tag; |
using value_type = Curve*; |
using difference_type = ptrdiff_t; |
using pointer = Curve*; |
using reference = Curve*&; |
|
bool operator==(DuplicatingIterator const &other) { |
return other.impl_ == impl_; |
} |