38# include <gtest/gtest.h>
43using namespace testing;
67 int ptr[4] = {0, 1, 2, 3};
76 for (
int i = 0; it.has_curr(); it.next(), ++i)
114constexpr size_t N = 29;
122 for (
size_t i = 0; i <
N; ++i, ++
n)
167 for (
size_t i = 0; it.has_curr(); it.next(), ++i)
175 for (
size_t i = 0; it.has_curr(); it.next(), ++i)
185 for (
size_t i = n - 1; it.has_curr(); it.prev(), --i)
207 for (
size_t i = 0; i <
dim; ++i)
TEST_F(Array_of_n_items, Iterator_with_simple_bounds)
Iterator wrapper for C++ raw arrays and circular buffers.
Lightweight wrapper that provides Aleph-w container interface for raw arrays.
T & get_last() const
Get the last element.
T & get_first() const
Get the first element.
Iterator get_it() const
Get an iterator to the beginning.
constexpr size_t size() const noexcept
Get the number of elements.
constexpr bool is_empty() const noexcept
Check if the container is empty.
Iterator wrapper for C++ raw arrays.
T & get_curr() const
Get the current item with bounds checking.
void reset_last() noexcept
Reset the iterator to the last item.
void reset() noexcept
Reset the iterator to the first item.
void prev()
Move to the previous item with bounds checking.
void next()
Advance to the next item with bounds checking.
void reset_first() noexcept
Reset the iterator to the first item (alias for reset()).
bool has_curr() const noexcept
Check if there is a current valid item.
__gmp_expr< typename __gmp_resolve_expr< T, V >::value_type, __gmp_binary_expr< __gmp_expr< T, U >, __gmp_expr< V, W >, __gmp_dim_function > > dim(const __gmp_expr< T, U > &expr1, const __gmp_expr< V, W > &expr2)
Main namespace for Aleph-w library functions.
Array_Container< T > make_array_container(T *array, size_t n)
Create an Array_Container from a raw array.
DynList< T > maps(const C &c, Op op)
Classic map operation.