Beast Logo

PrevUpHomeNext

write

Write to a DynamicBuffer.

template<
    class DynamicBuffer,
    class... Args>
void
write(
    DynamicBuffer& dynabuf,
    Args const&... args);

This function appends the serialized representation of each provided argument into the dynamic buffer. It is capable of converting the following types of arguments:

For all types not listed above, the function will invoke boost::lexical_cast on the argument in an attempt to convert to a string, which is then appended to the dynamic buffer.

When this function serializes numbers, it converts them to their text representation as if by a call to std::to_string.

Parameters

dynabuf

The dynamic buffer to write to.

args

A list of one or more arguments to write.

Exceptions

unspecified

Any exceptions thrown by boost::lexical_cast.

Remarks

This function participates in overload resolution only if the dynabuf parameter meets the requirements of DynamicBuffer.

Requirements

Header: beast/core/write_dynabuf.hpp

Convenience header: beast/core.hpp


PrevUpHomeNext