moved move/copyop to cpp for MSVC

This commit is contained in:
dekken 2019-03-24 23:14:28 +01:00
parent bd7f8c60c8
commit 67d029b7b1
2 changed files with 6 additions and 2 deletions

View File

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

View File

@ -17,6 +17,9 @@ Parser::Parser(std::istream& in) : Parser() { Load(in); }
Parser::~Parser() {}
Parser::Parser(Parser&&) = default;
Parser& Parser::operator=(Parser&&) = default;
Parser::operator bool() const {
return m_pScanner.get() && !m_pScanner->empty();
}