2016-11-20 07:32:41 -05:00
|
|
|
//
|
|
|
|
|
// Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
|
|
|
|
|
//
|
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
|
//
|
|
|
|
|
|
2017-06-03 08:40:53 -07:00
|
|
|
#ifndef BEAST_HTTP_IMPL_PARSER_IPP
|
|
|
|
|
#define BEAST_HTTP_IMPL_PARSER_IPP
|
2016-11-20 07:32:41 -05:00
|
|
|
|
|
|
|
|
namespace beast {
|
|
|
|
|
namespace http {
|
|
|
|
|
|
2017-06-03 08:40:53 -07:00
|
|
|
template<bool isRequest, class Fields>
|
|
|
|
|
template<class Arg0, class... ArgN, class>
|
|
|
|
|
header_parser<isRequest, Fields>::
|
|
|
|
|
header_parser(Arg0&& arg0, ArgN&&... argn)
|
|
|
|
|
: h_(std::forward<Arg0>(arg0),
|
|
|
|
|
std::forward<ArgN>(argn)...)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2016-11-20 07:32:41 -05:00
|
|
|
template<bool isRequest, class Body, class Fields>
|
|
|
|
|
template<class Arg1, class... ArgN, class>
|
2017-06-03 08:56:21 -07:00
|
|
|
parser<isRequest, Body, Fields>::
|
|
|
|
|
parser(Arg1&& arg1, ArgN&&... argn)
|
2016-11-20 07:32:41 -05:00
|
|
|
: m_(std::forward<Arg1>(arg1),
|
|
|
|
|
std::forward<ArgN>(argn)...)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template<bool isRequest, class Body, class Fields>
|
|
|
|
|
template<class... Args>
|
2017-06-03 08:56:21 -07:00
|
|
|
parser<isRequest, Body, Fields>::
|
|
|
|
|
parser(header_parser<
|
2016-11-20 07:32:41 -05:00
|
|
|
isRequest, Fields>&& parser, Args&&... args)
|
|
|
|
|
: base_type(std::move(static_cast<basic_parser<
|
2017-05-31 08:01:55 -07:00
|
|
|
isRequest, header_parser<isRequest, Fields>>&>(parser)))
|
2016-11-20 07:32:41 -05:00
|
|
|
, m_(parser.release(), std::forward<Args>(args)...)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // http
|
|
|
|
|
} // beast
|
|
|
|
|
|
|
|
|
|
#endif
|