@@ -43,6 +43,62 @@ class request_parser
4343 }
4444 };
4545
46+ /* * Destructor.
47+
48+ Any views or buffers obtained from this
49+ parser become invalid.
50+ */
51+ ~request_parser () = default ;
52+
53+ /* * Constructor.
54+
55+ Default-constructed parsers do not reference any
56+ implementation and therefore must be assigned to before using.
57+ */
58+ request_parser () noexcept = default ;
59+
60+ /* * Constructor.
61+
62+ The states of `other` are transferred
63+ to the newly constructed object,
64+ including the allocated buffer.
65+ After construction, the only valid
66+ operations on the moved-from object
67+ are destruction and assignment.
68+
69+ Buffer sequences previously obtained
70+ using @ref prepare or @ref pull_body
71+ remain valid.
72+
73+ @par Complexity
74+ Constant.
75+
76+ @param other The parser to move from.
77+ */
78+ request_parser (
79+ request_parser&& other) noexcept = default ;
80+
81+ /* * Assignment.
82+ The states of `other` are transferred
83+ to this object, including the allocated
84+ buffer.
85+ After assignment, the only valid
86+ operations on the moved-from object
87+ are destruction and assignment.
88+ Buffer sequences previously obtained
89+ using @ref prepare or @ref pull_body
90+ remain valid.
91+ @par Complexity
92+ Constant.
93+ @param other The parser to move from.
94+ */
95+ request_parser&
96+ operator =(request_parser&& other) noexcept
97+ {
98+ assign (std::move (other));
99+ return *this ;
100+ }
101+
46102 /* * Constructor.
47103
48104 Constructs a parser that uses the @ref
@@ -84,35 +140,7 @@ class request_parser
84140 */
85141 BOOST_HTTP_PROTO_DECL
86142 explicit
87- request_parser (const rts::context& ctx);
88-
89- /* * Constructor.
90-
91- The states of `other` are transferred
92- to the newly constructed object,
93- including the allocated buffer.
94- After construction, the only valid
95- operations on the moved-from object
96- are destruction and assignment.
97-
98- Buffer sequences previously obtained
99- using @ref prepare or @ref pull_body
100- remain valid.
101-
102- @par Complexity
103- Constant.
104-
105- @param other The parser to move from.
106- */
107- request_parser (
108- request_parser&& other) noexcept = default ;
109-
110- /* * Destructor.
111-
112- Any views or buffers obtained from this
113- parser become invalid.
114- */
115- ~request_parser () = default ;
143+ request_parser (rts::context const & ctx);
116144
117145 /* * Return a reference to the parsed request headers.
118146
0 commit comments