27template <
typename TYPE,
typename ALLOC>
68 template<
typename O_TYPE,
typename... Args>
77 template<
typename O_TYPE>
128template<
typename TYPE,
typename ALLOC>
132template<
typename TYPE,
typename ALLOC>
137template<
typename TYPE,
typename ALLOC>
142template<
typename TYPE,
typename ALLOC>
143template<
typename O_TYPE,
typename... Args>
145 this->
allocator.construct(o_ptr, std::forward<Args>(args)...);
148template<
typename TYPE,
typename ALLOC>
149template<
typename O_TYPE>
154template <
typename TYPE,
typename ALLOC>
156 return this->
size() == 0;
ALLOC allocator
The allocator instance used for memory management.
Definition container.h:34
virtual u_integer size() const=0
bool empty() const
Checks if the container is empty.
Definition container.h:155
virtual ~container()=default
Destructor for the container class.
void deallocate(TYPE *ptr, u_integer size)
Deallocates memory previously allocated by allocate()
Definition container.h:138
container(ALLOC alloc=ALLOC{})
Constructs a container with specified allocator.
Definition container.h:129
TYPE * allocate(u_integer size)
Allocates raw memory for elements.
Definition container.h:133
virtual bool contains(const TYPE &e) const =0
Checks if an element is contained in the container.
void destroy(O_TYPE *o_ptr)
Destroys an element.
Definition container.h:150
void construct(O_TYPE *o_ptr, Args &&... args)
Constructs an element in-place.
Definition container.h:144
Platform-independent integer and floating-point type definitions.
Main namespace for the project Original.
Definition algorithms.h:21
std::uint32_t u_integer
32-bit unsigned integer type for sizes and indexes
Definition config.h:43