Disallow moving for the Parser.

It wouldn't have compiled anyways, since the Scanner and Directive objects inside it are incomplete types at the time of the move definitions.
This commit is contained in:
Jesse Beder
2019-03-24 17:01:14 -05:00
parent 82e9571213
commit bd7f8c60c8

View File

@@ -28,11 +28,10 @@ class YAML_CPP_API Parser {
/** Constructs an empty parser (with no input. */ /** Constructs an empty parser (with no input. */
Parser(); Parser();
/** non copyable but movable */
Parser(const Parser&) = delete; Parser(const Parser&) = delete;
Parser(Parser&&) = default; Parser(Parser&&) = delete;
Parser& operator=(const Parser&) = delete; Parser& operator=(const Parser&) = delete;
Parser& operator=(Parser&&) = default; Parser& operator=(Parser&&) = delete;
/** /**
* Constructs a parser from the given input stream. The input stream must * Constructs a parser from the given input stream. The input stream must