Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards


The number of octets in the buffer pointed to by data.

std::size_t size = 0;
When Serializing

If data is nullptr during serialization, this value is ignored. Otherwise, it represents the number of valid body octets pointed to by data.

When Parsing

The value of this field will be decremented during parsing to indicate the number of remaining free octets in the buffer pointed to by data. When it reaches zero, the parser will return error::need_buffer, indicating to the caller that the values of data and size should be updated to point to a new memory buffer.