| Home | Libraries | People | FAQ | More

#### http::is_body_writer

Determine if a Body type has a reader.

##### Synopsis

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

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

##### Description

This metafunction is equivalent to `std::true_type` if:

- `T` has a nested type named `reader`
- The nested type meets the requirements of BodyWriter.

##### 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");
    }

Convenience header `<boost/beast/http.hpp>`