28template <
typename T, std::
size_t N>
32 typedef typename std::array<T, N>::iterator
iterator;
59 mooseError(
"Out of space in StaticallyAllocatedSet (size = ", N,
")");
95 for (std::size_t i = 0; i <
_end_pos; i++)
96 if (
_data[i] == value)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Optimized set with static allocation.
std::array< T, N >::const_iterator const_iterator
std::size_t size() const
Number of entries.
std::size_t _end_pos
Save the ending as positions internally.
void insert(const T &value)
Add a new entry to the set.
iterator end()
Iterator for the last entry.
bool contains(const T &value) const
Whether or not the set contains the given item.
std::size_t dataEndPos() const
Expert interface: the current ending position.
iterator begin()
Iterator for the first entry.
void clear()
Remove all entries.
std::array< T, N > _data
The data.
StaticallyAllocatedSet()
Create a set.
bool empty() const
Whether or not the set is empty.
std::array< T, N >::iterator iterator
void swap(StaticallyAllocatedSet< T, N > &other)
Swap the contents of this set with another.
const_iterator end() const
Const iterator for the last entry.
const_iterator begin() const
Const iterator for the first entry.