17#ifndef IOX_HOOFS_CXX_VECTOR_HPP
18#define IOX_HOOFS_CXX_VECTOR_HPP
20#include "iceoryx_hoofs/cxx/requires.hpp"
37template <
typename T, u
int64_t Capacity>
44 using const_iterator =
const T*;
52 vector(const uint64_t count, const T& value) noexcept;
56 vector(const uint64_t count) noexcept;
86 const_iterator
begin() const noexcept;
90 iterator
end() noexcept;
94 const_iterator
end() const noexcept;
102 const T*
data() const noexcept;
107 T&
at(const uint64_t index) noexcept;
112 const T&
at(const uint64_t index) const noexcept;
117 T& operator[](const uint64_t index) noexcept;
122 const T& operator[](const uint64_t index) const noexcept;
142 const T&
back() const noexcept;
150 uint64_t
size() const noexcept;
167 template <typename... Targs>
168 bool resize(const uint64_t count, const Targs&... args) noexcept;
173 template <typename... Targs>
174 bool emplace(const uint64_t position, Targs&&... args) noexcept;
178 template <typename... Targs>
196 iterator
erase(iterator position) noexcept;
199 using element_t = uint8_t[sizeof(T)];
200 alignas(T) element_t m_data[Capacity];
201 uint64_t m_size = 0u;
206template <typename T, uint64_t CapacityLeft, uint64_t CapacityRight>
207bool operator==(const
iox::cxx::
vector<T, CapacityLeft>& lhs, const
iox::cxx::
vector<T, CapacityRight>& rhs) noexcept;
209template <typename T, uint64_t CapacityLeft, uint64_t CapacityRight>
210bool operator!=(const
iox::cxx::
vector<T, CapacityLeft>& lhs, const
iox::cxx::
vector<T, CapacityRight>& rhs) noexcept;
212#include "iceoryx_hoofs/internal/cxx/vector.inl"
bool push_back(const PosixGroup &value) noexcept
PosixGroup & front() noexcept
PosixGroup * data() noexcept
bool emplace_back(Targs &&... args) noexcept
iterator erase(iterator position) noexcept
vector() noexcept=default
creates an empty vector
PosixGroup & at(const uint64_t index) noexcept
bool resize(const uint64_t count, const Targs &... args) noexcept
uint64_t size() const noexcept
bool emplace(const uint64_t position, Targs &&... args) noexcept
uint64_t capacity() const noexcept
PosixGroup & back() noexcept
iterator begin() noexcept
bool empty() const noexcept
building block to easily create free function for logging in a library context
Definition lockfree_queue.hpp:29