Some basic_fields special members are protected

This commit is contained in:
Vinnie Falco
2017-11-08 20:13:02 -08:00
parent 0f7670b7e0
commit ff2dc67afa
2 changed files with 21 additions and 17 deletions

View File

@@ -4,6 +4,7 @@ Version 140:
* Fix utf8_checker test failures
* Fix signature for async_read_some, and tests
* Tidy up basic_parser
* Some basic_fields special members are protected
--------------------------------------------------------------------------------

View File

@@ -230,6 +230,26 @@ class basic_parser
state state_ = state::nothing_yet; // initial state
unsigned f_ = 0; // flags
protected:
/// Default constructor
basic_parser() = default;
/// Move constructor
basic_parser(basic_parser &&) = default;
/// Move assignment
basic_parser& operator=(basic_parser &&) = default;
/** Move constructor
@note
After the move, the only valid operation on the
moved-from object is destruction.
*/
template<class OtherDerived>
basic_parser(basic_parser<isRequest, OtherDerived>&&);
public:
/// `true` if this parser parses requests, `false` for responses.
using is_request =
@@ -241,26 +261,9 @@ public:
/// Copy constructor
basic_parser(basic_parser const&) = delete;
/// Move constructor
basic_parser(basic_parser &&) = default;
/// Move assignment
basic_parser& operator=(basic_parser &&) = default;
/// Copy assignment
basic_parser& operator=(basic_parser const&) = delete;
/// Default constructor
basic_parser() = default;
/** Move constructor
After the move, the only valid operation on the
moved-from object is destruction.
*/
template<class OtherDerived>
basic_parser(basic_parser<isRequest, OtherDerived>&&);
/** Returns a reference to this object as a @ref basic_parser.
This is used to pass a derived class where a base class is