38#include <gtest/gtest.h>
46using namespace testing;
52 static inline int move_count = 0;
55 Movable() : value(0) {}
56 Movable(
int v) : value(v) {}
57 Movable(
const Movable &) =
default;
58 Movable & operator=(
const Movable &) =
default;
66 Movable & operator=(Movable &&
other)
noexcept
100 Movable::move_count = 0;
121 for (
int i = 0; i < 5; ++i)
124 std::vector<int>
got;
135 for (
int i = 0; i < 4; ++i)
149 for (
int i = 0; i < 5; ++i)
154 for (
size_t i = 0; i < b.
size(); ++i)
167 for (
int i = 0; i < 3; ++i)
189 for (
int i = 0; i < 4; ++i)
211 for (
int i = 0; i < 3; ++i)
228 Movable::move_count = 0;
244 std::mt19937
rng(123456);
245 std::uniform_int_distribution<int>
op_dist(0, 1);
246 std::uniform_int_distribution<int>
val_dist(-100, 100);
T & insert(const T &item)
Insert a new item by copy.
void empty() noexcept
empty the list
Iterator specialized for DynSlist returning payload references.
T & get_curr()
Return a reference to the current payload.
Dynamic list of elements of type T implemented with a singly linked list of nodes.
size_t size() const noexcept
Return the number of stored elements.
void remove(const int pos)
Remove the node at position pos.
void insert(const int pos, const T &data)
Insert an element at position pos.
size_t size() const noexcept
Count the number of elements of the list.
void next()
Advance the iterator to the next node.
bool has_curr() const noexcept
Return true if the iterator currently points to a node.
iterator begin() noexcept
Return an STL-compatible iterator to the first element.
Main namespace for Aleph-w library functions.
DynList< T > maps(const C &c, Op op)
Classic map operation.
Dynamic singly linked list.