|
microfmt
Zero-allocation C++ formatting for constrained environments
|
Factories for common remote C++ string object layouts. More...
#include <remote_basic_string.hpp>
Static Public Member Functions | |
| template<typename SizeReader , typename DataReader > | |
| static constexpr auto | callback_layout (SizeReader size_reader, DataReader data_reader) noexcept |
| Creates a layout from explicit size and data-address readers. | |
| template<typename RemotePtr = uintptr_t, typename RemoteSize = size_t> | |
| static constexpr auto | pointer_size_layout (ptrdiff_t data_offset, ptrdiff_t size_offset) noexcept |
| Creates a layout whose object always stores a data pointer and size. | |
| template<typename RemotePtr = uintptr_t, typename RemoteSize = size_t> | |
| static constexpr auto | size_selected_layout (ptrdiff_t data_offset, ptrdiff_t size_offset, ptrdiff_t inline_data_offset, size_t inline_capacity) noexcept |
| Creates a layout selected by the decoded string length. | |
Factories for common remote C++ string object layouts.
|
inlinestaticconstexprnoexcept |
Creates a layout from explicit size and data-address readers.
| size_reader | Callback retained by the size query. |
| data_reader | Callback retained by the data-address query. It receives the decoded size after the output reference. |
|
inlinestaticconstexprnoexcept |
Creates a layout whose object always stores a data pointer and size.
This also supports SSO implementations, such as libstdc++, whose data pointer points at the object's inline buffer while the string is short.
|
inlinestaticconstexprnoexcept |
Creates a layout selected by the decoded string length.
Strings no longer than inline_capacity are read from storage embedded in the object. Longer strings use the pointer stored at data_offset.