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 an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

http::is_body_reader

Determine if a Body type has a reader.

Synopsis

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

template<
    class T>
struct is_body_reader :
    public std::integral_constant< bool,...>
Description

This metafunction is equivalent to std::true_type if:

Template Parameters

Type

Description

T

The body type to test.

Example
template<bool isRequest, class Body, class Fields>
void check_can_parse(message<isRequest, Body, Fields>&)
{
    static_assert(is_body_reader<Body>::value,
        "Cannot parse Body, no reader");
}

Convenience header <boost/beast/http.hpp>


PrevUpHomeNext