Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

http::is_body_reader

Determine if a type has a nested BodyReader.

Synopsis

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

template<
    class T>
using is_body_reader = 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_parse([link beast.ref.boost__beast__http__message `message<isRequest, Body, Fields>`]&)
{
    static_assert ([link beast.ref.boost__beast__http__is_body_reader `is_body_reader<Body>::value`],
        "Cannot parse Body, no reader" );
}

PrevUpHomeNext