Syntalos::supports_buffer_reuse
Syntalos::supports_buffer_reuse
#include <datatypes.h>
Inherits from std::false_type
Detailed Description
template <typename T >
struct Syntalos::supports_buffer_reuse;Opt-in trait for buffer-reuse in DataStream
When supports_buffer_reuse
To opt a type in:
- Implement static void T::fromMemoryInto(const void*, size_t, T&) that deserializes into an existing T, reusing its internal buffers when the incoming data fits and the buffer is exclusively owned. REMEMBER TO CHECK REFCOUNT OF TARGET OBJECT BEFORE WRITING!!!
- Add a full specialization of supports_buffer_reuse below.
Updated on 2026-03-16 at 19:16:01 +0000