Class inline_vector¶
class inline_vector<T, N> base¶
template <typename T, size_t N>
struct inline_vector { … } A sequence container with fixed-capacity inline storage.
| T | The element type. |
| N | The maximum number of elements the vector can hold. |
typedef size_type ¶
using size_type = size_t Fully qualified name: kfr::inline_vector<T, N>::size_type
Declared at base/inline_vector.hpp:56
typedef stored_size_type ¶
using stored_size_type = std::conditional_t<(N >= UINT16_MAX), uint32_t,
std::conditional_t<(N >= UINT8_MAX), uint16_t, uint8_t>> Smallest unsigned integer able to hold values up to
N , used to store the current size.
Fully qualified name: kfr::inline_vector<T, N>::stored_size_type
Declared at base/inline_vector.hpp:58
typedef value_type ¶
using value_type = T Fully qualified name: kfr::inline_vector<T, N>::value_type
Declared at base/inline_vector.hpp:60
typedef pointer ¶
using pointer = T* Fully qualified name: kfr::inline_vector<T, N>::pointer
Declared at base/inline_vector.hpp:61
typedef const_pointer ¶
using const_pointer = const T* Fully qualified name: kfr::inline_vector<T, N>::const_pointer
Declared at base/inline_vector.hpp:62
typedef reference ¶
using reference = T& Fully qualified name: kfr::inline_vector<T, N>::reference
Declared at base/inline_vector.hpp:63
typedef const_reference ¶
using const_reference = const T& Fully qualified name: kfr::inline_vector<T, N>::const_reference
Declared at base/inline_vector.hpp:64
typedef iterator ¶
using iterator = pointer Fully qualified name: kfr::inline_vector<T, N>::iterator
Declared at base/inline_vector.hpp:65
typedef const_iterator ¶
using const_iterator = const_pointer Fully qualified name: kfr::inline_vector<T, N>::const_iterator
Declared at base/inline_vector.hpp:66
constructor inline_vector<T, N>() ¶
constexpr inline_vector() noexcept : m_size(0) { … } Creates an empty vector.
Fully qualified name: kfr::inline_vector<T, N>::inline_vector<T, N>()
Declared at base/inline_vector.hpp:69
constructor inline_vector<T, N>(const inline_vector<T, N> &) ¶
constexpr inline_vector(const inline_vector&) noexcept = default Fully qualified name: kfr::inline_vector<T, N>::inline_vector<T, N>(const inline_vector<T, N> &)
Declared at base/inline_vector.hpp:70
constructor inline_vector<T, N>(inline_vector<T, N> &&) ¶
constexpr inline_vector(inline_vector&&) noexcept = default Fully qualified name: kfr::inline_vector<T, N>::inline_vector<T, N>(inline_vector<T, N> &&)
Declared at base/inline_vector.hpp:71
function operator=(const inline_vector<T, N> &) ¶
constexpr inline_vector& operator=(const inline_vector&) noexcept = default Fully qualified name: kfr::inline_vector<T, N>::operator=(const inline_vector<T, N> &)
Declared at base/inline_vector.hpp:72
function operator=(inline_vector<T, N> &&) ¶
constexpr inline_vector& operator=(inline_vector&&) noexcept = default Fully qualified name: kfr::inline_vector<T, N>::operator=(inline_vector<T, N> &&)
Declared at base/inline_vector.hpp:73
constructor inline_vector<T, N>(size_type) ¶
Creates a vector holding initial_size value-initialized elements.
| initial_size | Number of elements to create (must be <= N ). |
Fully qualified name: kfr::inline_vector<T, N>::inline_vector<T, N>(size_type)
Declared at base/inline_vector.hpp:79
constructor inline_vector<T, N>(size_type, T) ¶
Creates a vector holding initial_size copies of initial_value .
| initial_size | Number of elements to create (must be <= N ). |
| initial_value | Value used to fill the vector. |
Fully qualified name: kfr::inline_vector<T, N>::inline_vector<T, N>(size_type, T)
Declared at base/inline_vector.hpp:88
constructor inline_vector<T, N>(std::initializer_list<T>) ¶
constexpr inline_vector(std::initializer_list<T> list) : inline_vector(list.begin(), list.end()) { … } Creates a vector from a brace-enclosed initializer list.
| list | Initializer list whose size must not exceed N . |
Fully qualified name: kfr::inline_vector<T, N>::inline_vector<T, N>(std::initializer_list<T>)
Declared at base/inline_vector.hpp:97
function inline_vector<T, N>(Iter, Iter) ¶
template <typename Iter>
constexpr inline_vector(Iter first, Iter last) { … } Creates a vector from the range [first, last) .
| Iter | Input iterator type. |
| first | Start of the source range. |
| last | End of the source range. |
Fully qualified name: kfr::inline_vector<T, N>::inline_vector<T, N>(Iter, Iter)
Declared at base/inline_vector.hpp:109
function at(size_type) ¶
constexpr const_reference at(size_type index) const { … } Returns a const reference to the element at index with bounds checking.
| index | Position of the element (must be < size() ). |
Fully qualified name: kfr::inline_vector<T, N>::at(size_type)
Declared at base/inline_vector.hpp:123
function at(size_type) ¶
Returns a reference to the element at index with bounds checking.
| index | Position of the element (must be < size() ). |
Fully qualified name: kfr::inline_vector<T, N>::at(size_type)
Declared at base/inline_vector.hpp:132
function operator[](size_type) ¶
constexpr const_reference operator[](size_type index) const noexcept { … } Returns a const reference to the element at index (no bounds checking).
Fully qualified name: kfr::inline_vector<T, N>::operator[](size_type)
Declared at base/inline_vector.hpp:139
function operator[](size_type) ¶
Returns a reference to the element at index (no bounds checking).
Fully qualified name: kfr::inline_vector<T, N>::operator[](size_type)
Declared at base/inline_vector.hpp:141
function size() ¶
constexpr size_type size() const noexcept { … } Returns the number of elements currently stored.
Fully qualified name: kfr::inline_vector<T, N>::size()
Declared at base/inline_vector.hpp:144
function data() ¶
constexpr pointer data() noexcept { … } Returns a pointer to the underlying element storage.
Fully qualified name: kfr::inline_vector<T, N>::data()
Declared at base/inline_vector.hpp:146
function data() ¶
constexpr const_pointer data() const noexcept { … } Returns a const pointer to the underlying element storage.
Fully qualified name: kfr::inline_vector<T, N>::data()
Declared at base/inline_vector.hpp:148
function empty() ¶
constexpr bool empty() const noexcept { … } Returns true if the vector holds no elements.
Fully qualified name: kfr::inline_vector<T, N>::empty()
Declared at base/inline_vector.hpp:150
function begin() ¶
constexpr iterator begin() noexcept { … } Returns an iterator to the first element.
Fully qualified name: kfr::inline_vector<T, N>::begin()
Declared at base/inline_vector.hpp:152
function end() ¶
constexpr iterator end() noexcept { … } Returns an iterator to one past the last element.
Fully qualified name: kfr::inline_vector<T, N>::end()
Declared at base/inline_vector.hpp:154
function begin() ¶
constexpr const_iterator begin() const noexcept { … } Returns a const iterator to the first element.
Fully qualified name: kfr::inline_vector<T, N>::begin()
Declared at base/inline_vector.hpp:156
function end() ¶
constexpr const_iterator end() const noexcept { … } Returns a const iterator to one past the last element.
Fully qualified name: kfr::inline_vector<T, N>::end()
Declared at base/inline_vector.hpp:158
function cbegin() ¶
constexpr const_iterator cbegin() const noexcept { … } Returns a const iterator to the first element.
Fully qualified name: kfr::inline_vector<T, N>::cbegin()
Declared at base/inline_vector.hpp:160
function cend() ¶
constexpr const_iterator cend() const noexcept { … } Returns a const iterator to one past the last element.
Fully qualified name: kfr::inline_vector<T, N>::cend()
Declared at base/inline_vector.hpp:162
function front() ¶
constexpr reference front() noexcept { … } Returns a reference to the first element.
Fully qualified name: kfr::inline_vector<T, N>::front()
Declared at base/inline_vector.hpp:165
function back() ¶
constexpr reference back() noexcept { … } Returns a reference to the last element.
Fully qualified name: kfr::inline_vector<T, N>::back()
Declared at base/inline_vector.hpp:167
function front() ¶
constexpr const_reference front() const noexcept { … } Returns a const reference to the first element.
Fully qualified name: kfr::inline_vector<T, N>::front()
Declared at base/inline_vector.hpp:169
function back() ¶
constexpr const_reference back() const noexcept { … } Returns a const reference to the last element.
Fully qualified name: kfr::inline_vector<T, N>::back()
Declared at base/inline_vector.hpp:171
function push_back(T) ¶
constexpr void push_back(T value) { … } Appends value to the end of the vector.
| value | Value to append. Triggers a logic error if the vector is full. |
Fully qualified name: kfr::inline_vector<T, N>::push_back(T)
Declared at base/inline_vector.hpp:177
function operator==(const inline_vector<T, N> &) ¶
constexpr bool operator==(const inline_vector& other) const { … } Returns true if both vectors contain the same elements in the same order.
Fully qualified name: kfr::inline_vector<T, N>::operator==(const inline_vector<T, N> &)
Declared at base/inline_vector.hpp:184
function operator!=(const inline_vector<T, N> &) ¶
constexpr bool operator!=(const inline_vector& other) const { … } Returns true if the vectors differ in size or contents.
Fully qualified name: kfr::inline_vector<T, N>::operator!=(const inline_vector<T, N> &)
Declared at base/inline_vector.hpp:189
variable m_values ¶
T m_values[N] Inline storage for the elements.
Fully qualified name: kfr::inline_vector<T, N>::m_values
Declared at base/inline_vector.hpp:192
variable m_size ¶
stored_size_type m_size Current number of elements stored.
Fully qualified name: kfr::inline_vector<T, N>::m_size
Declared at base/inline_vector.hpp:194
Fully qualified name: kfr::inline_vector<T, N>
Declared at base/inline_vector.hpp:46