1 #ifndef MADARA_DEEPITERATOR_H 2 #define MADARA_DEEPITERATOR_H 24 template<
class T,
class U =
void,
class V =
void>
31 template<
class T,
class V>
39 return value_type(i->deep_copy());
54 typedef std::pair<
const typename T::value_type::first_type &,
55 typename T::value_type::second_type>
59 return value_type(i->first, i->second.deep_copy());
70 template<
class Iterator>
72 public std::iterator<std::input_iterator_tag,
73 typename IteratorTraits<Iterator>::value_type>
88 return traits::get_deep_copy(i_);
100 return i_.operator->();
178 template<
class Iterator>
DeepIterator(const Iterator &i)
static value_type get_deep_copy(const T &i)
bool operator==(const DeepIterator &o) const
Equality operator.
static value_type get_deep_copy(const T &i)
DeepIterator::value_type value_type
IteratorTraits< Iterator > traits
std::pair< const typename T::value_type::first_type &, typename T::value_type::second_type > value_type
underlying_value_type * operator->() const
Pass-through to the underlying iterator's operator->().
DeepIterator operator++(int)
Post-fix increment.
DeepIterator< Iterator > deep_iterate(const Iterator &i)
Returns an input iterator from an iterator.
Specialize this template to support various kinds of iterators.
Iterator::value_type underlying_value_type
The iterator type returned by deep_iterate.
DeepIterator & operator++()
Pre-fix increment.
value_type operator*() const
Returns the same as the underlying iterator's operator*, except any values are deep copied first...
Helper class for type inference.
bool operator!=(const DeepIterator &o) const
Equality operator.