4#ifndef TETL_NET_BUFFER_CONST_HPP
5#define TETL_NET_BUFFER_CONST_HPP
7#include <etl/version.hpp>
9#include <etl/array.hpp>
10#include <etl/cstddef.hpp>
12namespace etl::experimental::
net {
39 auto const offset = n < _size ? n : _size;
40 _data =
static_cast<
char const*>(_data) + offset;
46 void const* _data =
nullptr;
47 etl::size_t _size = 0;
56 auto const* data =
static_cast<
char const*>(b
.data()) + offset;
Definition adjacent_find.hpp:9
Definition buffer_const.hpp:13
auto operator+(const_buffer const &b, etl::size_t const n) noexcept -> const_buffer
Create a new modifiable buffer that is offset from the start of another.
Definition buffer_const.hpp:53
auto operator+=(etl::size_t n) noexcept -> const_buffer &
Move the start of the buffer by the specified number of bytes.
Definition buffer_const.hpp:37
const_buffer() noexcept=default
Construct an empty buffer.
auto operator+(etl::size_t const n, const_buffer const &b) noexcept -> const_buffer
Create a new modifiable buffer that is offset from the start of another.
Definition buffer_const.hpp:64
auto data() const noexcept -> void const *
Get a pointer to the beginning of the memory range.
Definition buffer_const.hpp:25
const_buffer(void const *data, etl::size_t size)
Construct a buffer to represent a given memory range.
Definition buffer_const.hpp:18
auto size() const noexcept -> etl::size_t
Get the size of the memory range.
Definition buffer_const.hpp:31