30 #ifndef WRITABLE_BUFFER_HPP 31 #define WRITABLE_BUFFER_HPP 63 return {
nullptr, 0 };
67 return data ==
nullptr;
101 return {
nullptr, 0 };
114 static_assert(
sizeof(T) > 0,
"Empty base type");
116 assert(other.
size %
sizeof(T) == 0);
119 other.
size /
sizeof(T));
123 static_assert(
sizeof(T) > 0,
"Empty base type");
128 return data ==
nullptr;
constexpr WritableBuffer(std::nullptr_t)
static WritableBuffer< T > FromVoid(WritableBuffer< void > other)
Cast a WritableBuffer<void> to a WritableBuffer<T>.
const_pointer_type const_iterator
constexpr iterator end() const
constexpr bool IsEmpty() const
A reference to a memory area that is writable.
void pop_front()
Remove the first element (by moving the head pointer, does not actually modify the buffer)...
constexpr const_iterator cend() const
reference_type shift()
Remove the first element and return a reference to it.
const void * const_pointer_type
const T & const_reference_type
constexpr WritableBuffer(std::nullptr_t)
void pop_back()
Remove the last element (by moving the tail pointer, does not actually modify the buffer)...
void skip_front(size_type n)
reference_type back() const
Returns a reference to the last element.
constexpr WritableBuffer(pointer_type _data, size_type _size)
const_pointer_type const_iterator
static constexpr WritableBuffer Null()
constexpr bool IsNull() const
reference_type operator[](size_type i) const
constexpr bool IsEmpty() const
static constexpr WritableBuffer Null()
constexpr WritableBuffer(pointer_type _data, size_type _size)
constexpr WritableBuffer< void > ToVoid() const
constexpr iterator begin() const
constexpr const_iterator cbegin() const
const T * const_pointer_type
constexpr bool IsNull() const
reference_type front() const
Returns a reference to the first element.