Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
iterator.h
Go to the documentation of this file.
1#ifndef MSL_ITERATOR_H_
2#define MSL_ITERATOR_H_
3
4namespace std {
10
11template <class Iterator>
13 typedef typename Iterator::difference_type difference_type;
14 typedef typename Iterator::value_type value_type;
15 typedef typename Iterator::pointer pointer;
16 typedef typename Iterator::reference reference;
17 typedef typename Iterator::iterator_category iterator_category;
18};
19
20template <class T>
28
29template <class InputIterator, class Distance>
31 for (; n > 0; --n)
32 ++i;
33}
34
35template <class BidirectionalIterator, class Distance>
37 if (n >= 0)
38 for (; n > 0; --n)
39 ++i;
40 else
41 for (; n < 0; ++n)
42 --i;
43}
44
45template <class RandomAccessIterator, class Distance>
49
50template <class InputIterator, class Distance>
54
55// TODO: combine this with above later
56template <class InputIt, class Distance>
58 while (n > 0) {
59 --n;
60 ++it;
61 }
62}
63
64template <class InputIterator>
68 for (; first != last; ++first)
69 ++result;
70 return result;
71}
72
73template <class RandomAccessIterator>
78
79template <class InputIterator>
84
85// This needs to be defined with gcc concepts or something similar. Workaround.
86template <class InputIt, class Distance>
88 it += n;
89}
90
91} // namespace std
92
93#endif
T cLib_calcTimer(T *value)
Definition c_lib.h:79
n
Definition e_fmod.c:112
int i
Definition e_pow.c:165
static const double T[]
Definition k_tan.c:106
Definition d_a_e_wb.cpp:12
iterator_traits< InputIterator >::difference_type __distance(InputIterator first, InputIterator last, input_iterator_tag)
Definition iterator.h:66
iterator_traits< InputIterator >::difference_type distance(InputIterator first, InputIterator last)
Definition iterator.h:80
void advance_fake(InputIt &it, Distance n)
Definition iterator.h:57
void advance(InputIterator &i, Distance n)
Definition iterator.h:51
void __advance(InputIterator &i, Distance n, input_iterator_tag)
Definition iterator.h:30
void advance_pointer(InputIt &it, Distance n)
Definition iterator.h:87
int ptrdiff_t
Definition stddef.h:10
Definition iterator.h:8
Definition iterator.h:7
Definition iterator.h:5
T value_type
Definition iterator.h:23
random_access_iterator_tag iterator_category
Definition iterator.h:26
T * pointer
Definition iterator.h:24
T & reference
Definition iterator.h:25
ptrdiff_t difference_type
Definition iterator.h:22
Definition iterator.h:12
Iterator::reference reference
Definition iterator.h:16
Iterator::pointer pointer
Definition iterator.h:15
Iterator::difference_type difference_type
Definition iterator.h:13
Iterator::value_type value_type
Definition iterator.h:14
Iterator::iterator_category iterator_category
Definition iterator.h:17
Definition iterator.h:6
Definition iterator.h:9