Qualify some calls:

This fixes a problem where a call to read() is ambiguous because
the argument list contains objects from both boost::asio and
beast::http.

Users invoking read may need to do so fully qualified, by writing:
    beast::http::read(...);
This commit is contained in:
Vinnie Falco
2016-06-20 11:09:08 -04:00
parent 62219add69
commit 64206b5612
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
1.0.0-b7
* Fully qualify ambiguous calls to read and parse
--------------------------------------------------------------------------------
1.0.0-b6
* Use SFINAE on return values

View File

@ -412,7 +412,7 @@ read(SyncReadStream& stream, DynamicBuffer& dynabuf,
static_assert(is_ReadableBody<Body>::value,
"ReadableBody requirements not met");
error_code ec;
read(stream, dynabuf, msg, ec);
beast::http::read(stream, dynabuf, msg, ec);
if(ec)
throw system_error{ec};
}
@ -431,7 +431,7 @@ read(SyncReadStream& stream, DynamicBuffer& dynabuf,
static_assert(is_ReadableBody<Body>::value,
"ReadableBody requirements not met");
parser_v1<isRequest, Body, Headers> p;
parse(stream, dynabuf, p, ec);
beast::http::parse(stream, dynabuf, p, ec);
if(ec)
return;
assert(p.complete());