A fixed-size vector iterator class template.
More...
#include <fixed-vector.hpp>
|
using | iterator_category = std::random_access_iterator_tag |
| The iterator category.
|
|
using | value_type = T |
| The type of the elements.
|
|
using | difference_type = ptrdiff_t |
| The type used for representing differences between iterators.
|
|
using | pointer = T* |
| Pointer to the element type.
|
|
using | reference = T& |
| Reference to the element type.
|
|
template<typename T>
class ipaddress::fixed_vector_iterator< T >
A fixed-size vector iterator class template.
The fixed_vector_iterator class template provides an iterator for the fixed_vector class template. It allows for iteration over the elements in the fixed_vector.
- Template Parameters
-
T | type of the elements in the vector. |
◆ fixed_vector_iterator() [1/2]
◆ fixed_vector_iterator() [2/2]
template<typename T >
template<typename U , typename = typename std::enable_if<std::is_convertible<U*, T*>::value>::type>
◆ operator*()
Dereference operator.
- Returns
- A reference to the element pointed to by the iterator.
◆ operator->()
template<typename T >
inline pointer operator-> |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Pointer access operator.
- Returns
- A pointer to the element pointed to by the iterator.
◆ operator[]()
template<typename T >
inline reference operator[] |
( |
size_t | n | ) |
const |
|
inlinenodiscardnoexcept |
Access operator.
- Parameters
-
[in] | n | The index of the element to access. |
- Returns
- A reference to the element at index n.
◆ operator++() [1/2]
Pre-increment operator.
- Returns
- A reference to the iterator after incrementing.
◆ operator++() [2/2]
Post-increment operator.
- Returns
- A copy of the iterator before incrementing.
◆ operator--() [1/2]
Pre-decrement operator.
- Returns
- A reference to the iterator after decrementing.
◆ operator--() [2/2]
Post-decrement operator.
- Returns
- A copy of the iterator before decrementing.
◆ operator+=()
Addition assignment operator.
- Parameters
-
[in] | n | The number of elements to add. |
- Returns
- A reference to the iterator after addition.
◆ operator-=()
Subtraction assignment operator.
- Parameters
-
[in] | n | The number of elements to subtract. |
- Returns
- A reference to the iterator after subtraction.
◆ operator+()
Addition operator.
- Parameters
-
[in] | n | The number of elements to add. |
- Returns
- A new fixed_vector_iterator instance after addition.
◆ operator-() [1/2]
Subtraction operator.
- Parameters
-
[in] | n | The number of elements to subtract. |
- Returns
- A new fixed_vector_iterator instance after subtraction.
◆ operator-() [2/2]
Subtraction operator.
- Parameters
-
[in] | it | The iterator to subtract from. |
- Returns
- The difference between the two iterators.
◆ operator==()
Equality operator.
- Parameters
-
[in] | it | The iterator to compare with. |
- Returns
- true if this iterator is equal to the other iterator, false otherwise.
◆ operator!=()
Inequality operator.
- Parameters
-
[in] | it | The iterator to compare with. |
- Returns
- true if this iterator is not equal to the other iterator, false otherwise.
◆ operator<()
Less than operator.
- Parameters
-
[in] | it | The iterator to compare with. |
- Returns
- true if this iterator is less than the other iterator, false otherwise.
◆ operator<=()
Less than or equal to operator.
- Parameters
-
[in] | it | The iterator to compare with. |
- Returns
- true if this iterator is less than or equal to the other iterator, false otherwise.
◆ operator>()
Greater than operator.
- Parameters
-
[in] | it | The iterator to compare with. |
- Returns
- true if this iterator is greater than the other iterator, false otherwise.
◆ operator>=()
Greater than or equal to operator.
- Parameters
-
[in] | it | The iterator to compare with. |
- Returns
- true if this iterator is greater than or equal to the other iterator, false otherwise.
The documentation for this class was generated from the following file: