60 std::size_t m_capacity{};
65 using const_iterator = T*;
69 , m_capacity{capacity}
78 iterator begin()
const {
return m_ptr; }
79 iterator end()
const {
return m_ptr + m_size; }
81 std::size_t size()
const {
return m_size; }
83 T& operator[](std::size_t pos)
const
87 return *(m_ptr + pos);
92 assert(m_size + 1 <= m_capacity);
93 *(m_ptr + m_size) = std::move(t);
97 void push_back(
const T& t)
99 assert(m_size + 1 <= m_capacity);
100 *(m_ptr + m_size) = t;