Boost logo

Boost :

Subject: Re: [boost] [beast] message bodies
From: Mike Gresens (mike.gresens_at_[hidden])
Date: 2017-07-02 18:52:54


Am 02.07.2017 um 20:34 schrieb Vinnie Falco via Boost:

> On Sun, Jul 2, 2017 at 10:33 AM, Mike Gresens via Boost
> <boost_at_[hidden]> wrote:
>> As a user I'd prefer not to have string_body as a distinct type too. Same
>> for string_view_body. Both are tightly bounded to distinct types.
> To be clear, Peter was asking why not `response<std::string>` which is
> a different but legitimate question. There are design reasons why
> `std::string` cannot be a choice for Body.

I'm not that sure. He gave the "dynamic_body<std::string>" example.
So he wanted a body using std::string, i think.

>
>> So with a concept of "character sequence" we could introduce a
>> "sequence_body" working with models like std::string, std::string_view,
>> boost::string_ref, std::vector<char>, etc.
> What do you propose replacing this declaration with?
>
> response<string_body> req;

     response<string_body> req;"

nothing to change here since

     using string_body = beast::http::sequence_body<std::string>; // convenience decl in beast

Thanks,
Mike...


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk