Class array< T, Size, typename std::enable_if< Size !=0 >::type >
Synopsis
#include <include/flecs/cpp/util.hpp>
template <typename T, size_t Size>
class array<T, Size, typename std::enable_if<Size != 0>::type>
Description
No description yet.
Methods
array overload | ||
begin | ||
end | ||
operator[] |
Source
Lines 219-244 in include/flecs/cpp/util.hpp.
template <typename T, size_t Size>
class array<T, Size, typename std::enable_if<Size != 0>::type> {
public:
array() {};
array(const T (&elems)[Size]) {
int i = 0;
for (auto it = this->begin(); it != this->end(); ++ it) {
*it = elems[i ++];
}
}
T& operator[](size_t index) {
return m_array[index];
}
array_iterator<T> begin() {
return array_iterator<T>(m_array, 0);
}
array_iterator<T> end() {
return array_iterator<T>(m_array, Size);
}
private:
T m_array[Size];
};