Boost C++ Libraries

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

PrevUpHomeNext

http::is_body_writer

Determine if a type has a nested BodyWriter.

Synopsis

Defined in header <boost/beast/http/type_traits.hpp>

template<
    class T>
using is_body_writer = see-below;
Description

This alias template is std::true_type when:

Template Parameters

Type

Description

T

The body type to test.

Example
template < bool isRequest, class Body, class Fields>
void check_can_serialize(message<isRequest, Body, Fields> const &)
{
    static_assert (is_body_writer<Body>::value,
        "Cannot serialize Body, no reader" );
}

PrevUpHomeNext