20#ifndef GCC_ITERATOR_UTILS_H
21#define GCC_ITERATOR_UTILS_H 1
53template<
typename T,
typename BaseIT>
61 template<
typename... Ts>
63 :
m_base (std::forward<Ts> (args)...) {}
68 T
operator* ()
const {
return static_cast<T
> (*m_base); }
78template<
typename T,
typename BaseIT>
87template<
typename T,
typename BaseIT>
91 return m_base == other.
m_base;
94template<
typename T,
typename BaseIT>
98 return m_base != other.
m_base;
106template<
typename T,
typename BaseCT>
117 template<
typename... Ts>
119 : BaseCT (std::forward<Ts> (args)...) {}
124 T
front ()
const {
return static_cast<T
> (BaseCT::front ()); }
125 T
back ()
const {
return static_cast<T
> (BaseCT::back ()); }
129template<
typename T,
typename BaseCT>
133 return static_cast<T
> (BaseCT::operator[] (
i));
139template<
typename T,
typename StoredT = T>
147 template<
typename... Ts>
158template<
typename T,
typename StoredT>
165template<
typename T,
typename StoredT>
174template<
typename T, T *(T::*Next) () const>
181 using parent::parent;
186template<
typename T, T *(T::*Next) () const>
190 this->m_contents = (this->m_contents->*Next) ();
194template<
typename T, T *(T::*Next) () const>
199 this->m_contents = (this->m_contents->*Next) ();
265template<
typename Container>
271 { range.begin (), range.end () },
272 { range.end (), range.end () }
Definition iterator-utils.h:108
T back() const
Definition iterator-utils.h:125
const_iterator begin() const
Definition iterator-utils.h:121
const_derived_container()=default
const_derived_container(Ts... args)
Definition iterator-utils.h:118
typename BaseCT::const_iterator base_const_iterator
Definition iterator-utils.h:109
T operator[](unsigned int i) const
Definition iterator-utils.h:131
T value_type
Definition iterator-utils.h:112
derived_iterator< T, base_const_iterator > const_iterator
Definition iterator-utils.h:113
T front() const
Definition iterator-utils.h:124
const_iterator end() const
Definition iterator-utils.h:122
Definition iterator-utils.h:55
bool operator!=(const derived_iterator &other) const
Definition iterator-utils.h:96
T * operator->() const
Definition iterator-utils.h:69
derived_iterator(Ts... args)
Definition iterator-utils.h:62
T operator*() const
Definition iterator-utils.h:68
derived_iterator()=default
derived_iterator & operator++()
Definition iterator-utils.h:65
bool operator==(const derived_iterator &other) const
Definition iterator-utils.h:89
BaseIT m_base
Definition iterator-utils.h:75
T value_type
Definition iterator-utils.h:57
Definition iterator-utils.h:176
list_iterator & operator++()
Definition iterator-utils.h:188
Definition iterator-utils.h:208
void advance()
Definition iterator-utils.h:227
T get_next()
Definition iterator-utils.h:213
const T m_end
Definition iterator-utils.h:210
safe_iterator & operator++()
Definition iterator-utils.h:247
safe_iterator(T iter, T end)
Definition iterator-utils.h:260
T m_next
Definition iterator-utils.h:211
bool operator==(const safe_iterator &other) const
Definition iterator-utils.h:235
T m_current
Definition iterator-utils.h:209
T::value_type operator*() const
Definition iterator-utils.h:245
bool operator!=(const safe_iterator &other) const
Definition iterator-utils.h:240
Definition iterator-utils.h:141
T value_type
Definition iterator-utils.h:143
wrapper_iterator()=default
T operator*() const
Definition iterator-utils.h:150
wrapper_iterator(Ts... args)
Definition iterator-utils.h:148
bool operator==(const wrapper_iterator &) const
Definition iterator-utils.h:160
bool operator!=(const wrapper_iterator &) const
Definition iterator-utils.h:167
StoredT m_contents
Definition iterator-utils.h:155
static struct token T
Definition gengtype-parse.cc:45
iterator_range< safe_iterator< typename Container::const_iterator > > iterate_safely(Container range)
Definition iterator-utils.h:268
i
Definition poly-int.h:776
Definition iterator-utils.h:26
T end() const
Definition iterator-utils.h:35
T begin() const
Definition iterator-utils.h:34
T m_begin
Definition iterator-utils.h:40
T m_end
Definition iterator-utils.h:41
iterator_range(const T &begin, const T &end)
Definition iterator-utils.h:31
T const_iterator
Definition iterator-utils.h:28
#define bool
Definition system.h:886
T * end(vec< T, A, L > *v)
Definition vec.h:457