Add util::spatial_array::empty

This commit is contained in:
Nikita Lisitsa 2024-06-03 23:25:11 +03:00
parent 488290be4f
commit 6c5815ff76

View file

@ -4,7 +4,6 @@
#include <psemek/util/exception.hpp>
#include <psemek/util/to_string.hpp>
#include <stdexcept>
#include <cstdint>
namespace psemek::util
@ -36,6 +35,7 @@ namespace psemek::util
void expand(Ix ... index);
void clear();
bool empty() const;
T * begin();
T * end();
@ -200,6 +200,12 @@ namespace psemek::util
array_.clear();
}
template <typename T, std::size_t N, typename Index>
bool spatial_array<T, N, Index>::empty() const
{
return array_.empty();
}
template <typename T, std::size_t N, typename Index>
T * spatial_array<T, N, Index>::begin()
{