Wire alignment of the payload of T: T::PayloadAlignment if declared, else 1. More...
#include <messages.hpp>
Wire alignment of the payload of T: T::PayloadAlignment if declared, else 1.
A type declares static constexpr size_t PayloadAlignment = N; (a power of two up to MaxPayloadAlignment) to get its payload at a stream offset that is a multiple of N: the writer puts zero padding after the header and stores its length in the top bits of THeader::MessageId. TZeroCopyEnvelopeReaderV2 keeps chunk addresses congruent to stream offsets modulo MaxPayloadAlignment, so the payload is N-aligned in memory; the other readers copy payloads into operator new memory. Frames of types without it are written exactly as before.