| Home | Libraries | People | FAQ | More

###### http::serializer::serializer (3 of 3 overloads)

Constructor.

###### Synopsis

    serializer(
        value_type& msg);

###### Description

The implementation guarantees that the message passed on construction will not be accessed until the first call to `next`. This allows the message to be lazily created. For example, if the header is filled in before serialization.

###### Parameters

Name | Description
--- | ---
`msg` | A reference to the message to serialize, which must remain valid for the lifetime of the serializer. Depending on the type of Body used, this may or may not be a `const` reference.

###### Remarks

This function participates in overload resolution only if Body::writer is constructible from a `const` message reference.