2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // Official repository: https://github.com/boostorg/beast
10 #ifndef BOOST_BEAST_HTTP_IMPL_PARSER_IPP
11 #define BOOST_BEAST_HTTP_IMPL_PARSER_IPP
13 #include <boost/throw_exception.hpp>
20 template<bool isRequest, class Body, class Allocator>
21 parser<isRequest, Body, Allocator>::
27 template<bool isRequest, class Body, class Allocator>
28 template<class Arg1, class... ArgN, class>
29 parser<isRequest, Body, Allocator>::
30 parser(Arg1&& arg1, ArgN&&... argn)
31 : m_(std::forward<Arg1>(arg1),
32 std::forward<ArgN>(argn)...)
38 template<bool isRequest, class Body, class Allocator>
39 template<class OtherBody, class... Args, class>
40 parser<isRequest, Body, Allocator>::
41 parser(parser<isRequest, OtherBody, Allocator>&& other,
43 : base_type(std::move(other))
44 , m_(other.release(), std::forward<Args>(args)...)
48 BOOST_THROW_EXCEPTION(std::invalid_argument{
49 "moved-from parser has a body"});