38 using element_t = ElementType;
61 bool tryPush(ElementType&& value) noexcept;
67 bool tryPush(const ElementType& value) noexcept;
74 iox::cxx::optional<ElementType>
push(const ElementType& value) noexcept;
81 iox::cxx::optional<ElementType>
push(ElementType&& value) noexcept;
86 iox::cxx::optional<ElementType>
pop() noexcept;
101 uint64_t
size() const noexcept;
104 using Queue = IndexQueue<Capacity>;
105 using BufferIndex = typename Queue::value_t;
114 Buffer<ElementType, Capacity, BufferIndex> m_buffer;
116 std::atomic<uint64_t> m_size{0u};
120 template <
typename T>
121 void writeBufferAt(
const BufferIndex&, T&&) noexcept;
124 template <typename T>
125 iox::cxx::optional<ElementType> pushImpl(T&& value) noexcept;
127 cxx::optional<ElementType> readBufferAt(const BufferIndex&) noexcept;