1#ifndef SBL_CORE_PRIMITIVES_CONTAINERS_FIXED_ARRAY_HPP_
2#define SBL_CORE_PRIMITIVES_CONTAINERS_FIXED_ARRAY_HPP_
30template<
typename T,
size_t N>
32 static_assert(N > 0,
"Array size must be greater than 0");
56 explicit Array(
const T& value) {
91 return (index < N) ? data_[index] : data_[0];
101 return (index < N) ? data_[index] : data_[0];
240 data_[i] = other.data_[i];
241 other.data_[i] = temp;
Fixed-size array container.
constexpr size_type max_size() const
Get maximum size.
const_reference back() const
Access last element (const)
const_reference operator[](size_type index) const
Access element at index (const)
constexpr bool empty() const
Check if array is empty.
pointer data()
Get pointer to underlying array.
const_iterator begin() const
Get iterator to beginning (const)
iterator begin()
Get iterator to beginning.
reference at(size_type index)
Access element with bounds checking.
reference front()
Access first element.
const T & const_reference
const_reference front() const
Access first element (const)
reference operator[](size_type index)
Access element at index.
reference back()
Access last element.
const_pointer data() const
Get pointer to underlying array (const)
void swap(Array &other)
Swap contents with another array.
constexpr size_type size() const
Get array size.
Array(const T &value)
Fill constructor.
Array()=default
Default constructor.
const_reference at(size_type index) const
Access element with bounds checking (const)
iterator end()
Get iterator to end.
const_iterator end() const
Get iterator to end (const)
void fill(const T &value)
Fill array with value.
Root namespace for all Sound Byte Libs functionality.