33 auto begin()
const {
return m_ptr; }
34 auto end()
const {
return m_ptr + m_size; }
36 auto size()
const {
return m_size; }
38 T& operator[](std::size_t pos)
const
42 return *(m_ptr + pos);
46 #define make_dynarray(Type, Count) \
47 score::dynarray_impl<Type> \
49 (Type*)alloca(sizeof(Type) * Count), Count \
58 std::size_t m_capacity{};
63 using const_iterator = T*;
67 , m_capacity{capacity}
76 iterator begin()
const {
return m_ptr; }
77 iterator end()
const {
return m_ptr + m_size; }
79 std::size_t size()
const {
return m_size; }
81 T& operator[](std::size_t pos)
const
85 return *(m_ptr + pos);
90 assert(m_size + 1 <= m_capacity);
91 *(m_ptr + m_size) = std::move(t);
95 void push_back(
const T& t)
97 assert(m_size + 1 <= m_capacity);
98 *(m_ptr + m_size) = t;
103 #define make_dynvector(Type, Count) \
104 score::dynvector_impl<Type> \
106 (Type*)alloca(sizeof(Type) * Count), Count \
Definition: ArrayView.hpp:15
Definition: ArrayView.hpp:54
Base toolkit upon which the software is built.
Definition: Application.cpp:90