Refactor message and message_headers declarations:

message_headers is now a set of partial class template
specializations instead of a template class alias. This solves
a problem where template functions taking message_headers as a
parameter could not deduce argument types, since std::conditional
obscured the deduced context.

Both classes are refactored to share declarations using an #ifdef,
to eliminate an ugly set of extra declarations needed when building
the documentation.

Copy and move class special members are added.

A new function message::base() is provided which returns the
message_headers portion of a message.
This commit is contained in:
Vinnie Falco
2017-07-20 08:12:13 -07:00
parent 595c5e0b6b
commit 50bc9a58cd
8 changed files with 349 additions and 228 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ public:
streambuf rb;
headers_parser_v1<true, headers> p0;
parse(ss, rb, p0);
request_headers<headers> const& reqh = p0.get();
request_headers const& reqh = p0.get();
BEAST_EXPECT(reqh.method == "GET");
BEAST_EXPECT(reqh.url == "/");
BEAST_EXPECT(reqh.version == 11);