Permalink
Browse files

util: remove unused Enumerate helper class

We now use make_range() with the iterator helper class to
create temporary range objects.
  • Loading branch information...
rianhunter committed Sep 3, 2014
1 parent b971eb0 commit 0e381c03a8c6f5a999148a0618fe65fa2f7d8485
Showing with 0 additions and 25 deletions.
  1. +0 −25 src/safe/util.hpp
@@ -192,31 +192,6 @@ class EnumerateIterator {
}
};

template<typename RangeType>
class Enumerate {
typedef decltype(std::declval<RangeType>().begin()) BeginIterator;
typedef decltype(std::declval<RangeType>().end()) EndIterator;

BeginIterator _begin;
EndIterator _end;

public:
template<typename R>
explicit Enumerate(R && rt)
: _begin(std::forward<R>(rt).begin())
, _end(std::forward<R>(rt).end()) {}

EnumerateIterator<BeginIterator>
begin() const {
return EnumerateIterator<BeginIterator>(0, _begin);
}

EnumerateIterator<EndIterator>
end() const {
return EnumerateIterator<EndIterator>(_end - _begin, _end);
}
};

template<typename Iterator>
class ReversedIterator {
Iterator _iterator;

0 comments on commit 0e381c0

Please sign in to comment.