|
quill
|
Provides serialization (codec) functionality for complex user-defined types. More...
#include <DeferredFormatCodec.h>
Static Public Member Functions | |
| static size_t | compute_encoded_size (detail::SizeCacheVector &, T const &) noexcept |
| template<typename Arg > | |
| static void | encode (std::byte *&buffer, detail::SizeCacheVector const &, uint32_t &, Arg &&arg) |
| static T | decode_arg (std::byte *&buffer) |
| static void | decode_and_store_arg (std::byte *&buffer, DynamicFormatArgStore *args_store) |
Static Public Attributes | |
| static constexpr bool | use_memcpy |
Provides serialization (codec) functionality for complex user-defined types.
This codec minimizes overhead on the hot-path by directly using std::memcpy or placement new to serialize objects into the SPSC buffer,
This approach avoids expensive string formatting on the hot path.
For a non trivially copyable types it requires valid copy constructor and move constructor.
Thread-Safety for non trivially copyable types: It is the user's responsibility to ensure that an non trivially copyable type remains thread-safe after being copied. For example, if the object contains a shared_ptr, ensure that its underlying value will not be modified.
Example usage:
|
static |
1.8.13