#ifndef FIXEDARRAYLIST_H_ #define FIXEDARRAYLIST_H_ #include #include #include "ArrayList.h" /** * \ingroup container */ template class FixedArrayList : public ArrayList { static_assert(MAX_SIZE <= std::numeric_limits::max(), "count_t is not large enough to hold MAX_SIZE"); private: T data[MAX_SIZE]; public: FixedArrayList() : ArrayList(data, MAX_SIZE) {} FixedArrayList(const FixedArrayList& other) : ArrayList(data, MAX_SIZE) { memcpy(this->data, other.data, sizeof(this->data)); this->entries = data; this->size = other.size; } FixedArrayList& operator=(FixedArrayList other) { memcpy(this->data, other.data, sizeof(this->data)); this->entries = data; this->size = other.size; return *this; } virtual ~FixedArrayList() {} }; #endif /* FIXEDARRAYLIST_H_ */