|
|
@@ -15,11 +15,16 @@ namespace iterator {
|
|
|
template <typename It, typename S>
|
|
|
class sentinel_iterator : public proxy<It, sentinel_iterator<It, S>> {
|
|
|
public:
|
|
|
- using super_t = proxy<It, sentinel_iterator<It>>;
|
|
|
+ using super_t = proxy<It, sentinel_iterator<It, S>>;
|
|
|
using sentinel_type = sentinel_iterator;
|
|
|
|
|
|
public:
|
|
|
using super_t::super_t;
|
|
|
+ sentinel_iterator(S) : super_t() {}
|
|
|
+
|
|
|
+ bool equal_to(sentinel_iterator const & other) const {
|
|
|
+ return (at_end() && other.at_end()) || super_t::impl() == other.impl();
|
|
|
+ }
|
|
|
bool at_end() const { return super_t::impl() == S(); }
|
|
|
};
|
|
|
}
|