1 #ifndef MADARA_DEEPITERATOR_H
2 #define MADARA_DEEPITERATOR_H
25 template<
class T,
class U =
void,
class V =
void>
33 template<
class T,
class V>
55 typename
TypeHelper<typename T::value_type::second_type>::type>
62 typedef std::pair<
const typename T::value_type::first_type&,
63 typename T::value_type::second_type>
68 return value_type(i->first, i->second.deep_copy());
79 template<
class Iterator>
81 typename IteratorTraits<Iterator>::value_type>
96 return traits::get_deep_copy(
i_);
108 return i_.operator->();
186 template<
class Iterator>
DeepIterator< Iterator > deep_iterate(const Iterator &i)
Returns an input iterator from an iterator.
The iterator type returned by deep_iterate.
underlying_value_type * operator->() const
Pass-through to the underlying iterator's operator->().
value_type operator*() const
Returns the same as the underlying iterator's operator*, except any values are deep copied first.
Iterator::value_type underlying_value_type
DeepIterator::value_type value_type
friend DeepIterator< I > deep_iterate(const I &i)
DeepIterator operator++(int)
Post-fix increment.
bool operator!=(const DeepIterator &o) const
Equality operator.
bool operator==(const DeepIterator &o) const
Equality operator.
IteratorTraits< Iterator > traits
DeepIterator(const Iterator &i)
DeepIterator & operator++()
Pre-fix increment.
std::pair< const typename T::value_type::first_type &, typename T::value_type::second_type > value_type
static value_type get_deep_copy(const T &i)
static value_type get_deep_copy(const T &i)
Specialize this template to support various kinds of iterators.
Helper class for type inference.