forked from boostorg/beast
Refactor type_traits (API Change):
fix #373 * concepts.hpp is renamed to type_traits.hpp * Body reader and writer concepts are renamed
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <beast/core/error.hpp>
|
||||
#include <beast/core/string_view.hpp>
|
||||
#include <beast/http/concepts.hpp>
|
||||
#include <beast/http/type_traits.hpp>
|
||||
#include <beast/http/rfc7230.hpp>
|
||||
#include <beast/core/detail/ci_char_traits.hpp>
|
||||
#include <beast/core/detail/type_traits.hpp>
|
||||
@@ -130,7 +130,7 @@ prepare_content_length(prepare_info& pi,
|
||||
message<isRequest, Body, Fields> const& msg,
|
||||
std::true_type)
|
||||
{
|
||||
typename Body::writer w(msg);
|
||||
typename Body::reader w{msg};
|
||||
// VFALCO This is a design problem!
|
||||
error_code ec;
|
||||
w.init(ec);
|
||||
@@ -159,15 +159,13 @@ prepare(message<isRequest, Body, Fields>& msg,
|
||||
Options&&... options)
|
||||
{
|
||||
// VFALCO TODO
|
||||
static_assert(is_Body<Body>::value,
|
||||
static_assert(is_body<Body>::value,
|
||||
"Body requirements not met");
|
||||
static_assert(has_writer<Body>::value,
|
||||
"Body has no writer");
|
||||
static_assert(is_Writer<Body>::value,
|
||||
"Writer requirements not met");
|
||||
static_assert(is_body_reader<Body>::value,
|
||||
"BodyReader requirements not met");
|
||||
detail::prepare_info pi;
|
||||
detail::prepare_content_length(pi, msg,
|
||||
detail::has_content_length<typename Body::writer>{});
|
||||
detail::has_content_length<typename Body::reader>{});
|
||||
detail::prepare_options(pi, msg,
|
||||
std::forward<Options>(options)...);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user