Narrow the use of Fields parameters:

Every interface or implementation which operates on a templated
type Fields is evaluated to determine if basic_fields<Allocator>
is more appropriate, and changed if so.
This commit is contained in:
Vinnie Falco
2017-07-20 08:15:27 -07:00
parent 50902c3938
commit 087844c487
14 changed files with 172 additions and 142 deletions
+8 -6
View File
@@ -101,11 +101,12 @@ do_accept(
}
template<class NextLayer>
template<class Fields, class Decorator>
template<class Allocator, class Decorator>
void
stream<NextLayer>::
do_accept(http::header<true, Fields> const& req,
Decorator const& decorator, error_code& ec)
do_accept(http::header<true,
http::basic_fields<Allocator>> const& req,
Decorator const& decorator, error_code& ec)
{
auto const res = build_response(req, decorator);
http::write(stream_, res, ec);
@@ -192,11 +193,12 @@ build_request(detail::sec_ws_key_type& key,
}
template<class NextLayer>
template<class Fields, class Decorator>
template<class Allocator, class Decorator>
response_type
stream<NextLayer>::
build_response(http::header<true, Fields> const& req,
Decorator const& decorator)
build_response(http::header<true,
http::basic_fields<Allocator>> const& req,
Decorator const& decorator)
{
auto const decorate =
[&decorator](response_type& res)