|
microfmt
Zero-allocation C++ formatting for constrained environments
|
Non-templated base class for dynamically growing buffers. More...
#include <memory_buffer.hpp>

Public Types | |
| using | value_type = char |
| using | size_type = std::size_t |
| using | difference_type = std::ptrdiff_t |
| using | reference = value_type & |
| using | const_reference = const value_type & |
| using | pointer = value_type * |
| using | const_pointer = const value_type * |
| using | iterator = pointer |
| using | const_iterator = const_pointer |
Public Member Functions | |
| memory_buffer_base (const memory_buffer_base &)=delete | |
| memory_buffer_base & | operator= (const memory_buffer_base &)=delete |
| RELOCO_BLOCK_RVALUE_ACCESS (memory_buffer_base) | |
| ~memory_buffer_base () noexcept | |
| sink | as_sink () &noexcept RELOCO_LIFETIMEBOUND |
| Creates a type-erased sink adapter pointing to this instance. | |
| constexpr microfmt::string_view | view () const &noexcept RELOCO_LIFETIMEBOUND |
| constexpr pointer | data () &noexcept RELOCO_LIFETIMEBOUND |
| constexpr const_pointer | data () const &noexcept RELOCO_LIFETIMEBOUND |
| constexpr iterator | begin () &noexcept RELOCO_LIFETIMEBOUND |
| constexpr const_iterator | begin () const &noexcept RELOCO_LIFETIMEBOUND |
| constexpr const_iterator | cbegin () const &noexcept RELOCO_LIFETIMEBOUND |
| constexpr iterator | end () &noexcept RELOCO_LIFETIMEBOUND |
| constexpr const_iterator | end () const &noexcept RELOCO_LIFETIMEBOUND |
| constexpr const_iterator | cend () const &noexcept RELOCO_LIFETIMEBOUND |
| constexpr size_type | size () const noexcept |
| constexpr size_type | capacity () const noexcept |
| constexpr bool | empty () const noexcept |
| constexpr reference | operator[] (size_type pos) &noexcept RELOCO_LIFETIMEBOUND |
| constexpr const_reference | operator[] (size_type pos) const &noexcept RELOCO_LIFETIMEBOUND |
| constexpr reference | front () &noexcept RELOCO_LIFETIMEBOUND |
| constexpr const_reference | front () const &noexcept RELOCO_LIFETIMEBOUND |
| constexpr reference | back () &noexcept RELOCO_LIFETIMEBOUND |
| constexpr const_reference | back () const &noexcept RELOCO_LIFETIMEBOUND |
| RELOCO_REINITIALIZES void | clear () &noexcept |
| void | push_back (char c) &noexcept |
| Fast-path single character append (enables std::back_inserter compatibility). | |
Protected Member Functions | |
| constexpr | memory_buffer_base (reloco::allocator_ref alloc, char *inline_buf, std::size_t inline_cap) noexcept |
| Initializes the buffer state using the derived class's stack storage. | |
| constexpr | memory_buffer_base (memory_buffer_base &&other, char *new_inline_ptr, std::size_t inline_cap) noexcept |
| Move-constructs from another buffer base, resolving inline pointers. | |
| void | move_assign (memory_buffer_base &&other, std::size_t inline_cap) noexcept |
| Safely move-assigns the buffer, handling heap/stack transitions. | |
Non-templated base class for dynamically growing buffers.
Contains all the size, capacity, and reallocation logic to completely avoid template bloat. Functions can accept a reference to this base class to operate on buffers of any inline capacity.
| using microfmt::detail::memory_buffer_base::const_pointer = const value_type * |
| using microfmt::detail::memory_buffer_base::const_reference = const value_type & |
| using microfmt::detail::memory_buffer_base::difference_type = std::ptrdiff_t |
| using microfmt::detail::memory_buffer_base::size_type = std::size_t |
| using microfmt::detail::memory_buffer_base::value_type = char |
|
delete |
|
inlinenoexcept |
|
inlineconstexprprotectednoexcept |
Initializes the buffer state using the derived class's stack storage.
|
inlineconstexprprotectednoexcept |
Move-constructs from another buffer base, resolving inline pointers.
|
inlinenoexcept |
Creates a type-erased sink adapter pointing to this instance.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineprotectednoexcept |
Safely move-assigns the buffer, handling heap/stack transitions.
|
delete |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
Fast-path single character append (enables std::back_inserter compatibility).
| microfmt::detail::memory_buffer_base::RELOCO_BLOCK_RVALUE_ACCESS | ( | memory_buffer_base | ) |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |