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

This is the documentation for a snapshot of the master branch, built from commit b5c99c1c90.
PrevUpHomeNext

http::is_body

Determine if a type meets the Body named requirements.

Synopsis

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

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

This alias template is std::true_type if T meets the requirements, otherwise it is std::false_type.

Template Parameters

Type

Description

T

The type to test.

Example
template<bool isRequest, class Body, class Fields>
void check_body(message<isRequest, Body, Fields> const&)
{
    static_assert(is_body<Body>::value,
        "Body type requirements not met");
}

PrevUpHomeNext