|
microfmt
Zero-allocation C++ formatting for constrained environments
|
A dynamically growing buffer with inline stack storage. More...
#include <memory_buffer.hpp>


Public Member Functions | |
| constexpr | memory_buffer (reloco::allocator_ref alloc) noexcept |
| constexpr | memory_buffer () noexcept |
| constexpr | memory_buffer (memory_buffer &&other) noexcept |
| memory_buffer & | operator= (memory_buffer &&other) noexcept |
Public Member Functions inherited from microfmt::detail::memory_buffer_base | |
| 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). | |
Additional Inherited Members | |
Public Types inherited from microfmt::detail::memory_buffer_base | |
| 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 |
Protected Member Functions inherited from microfmt::detail::memory_buffer_base | |
| 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. | |
A dynamically growing buffer with inline stack storage.
Inherits all logic from memory_buffer_base, providing only the inline stack storage array to prevent template bloat.
| InlineCapacity | Number of bytes to store on the stack. |
|
inlineexplicitconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |