diff --git a/include/athena/DNAYaml.hpp b/include/athena/DNAYaml.hpp index 8499153..a8b5360 100644 --- a/include/athena/DNAYaml.hpp +++ b/include/athena/DNAYaml.hpp @@ -1286,10 +1286,13 @@ struct StringYaml : public DNAYaml, public std::string {this->assign(std::move(reader.readString(nullptr)));} void write(athena::io::YAMLDocWriter& writer) const {writer.writeString(nullptr, *this);} + StringYaml() = default; + StringYaml(const std::string& __str) : std::string(__str) {} + StringYaml(std::string&& __str) : std::string(std::move(__str)) {} std::string& operator=(const std::string& __str) {return this->assign(__str);} std::string& operator=(std::string&& __str) - {this->swap(__str); return *this;} + {static_cast(*this) = std::move(__str); return *this;} }; template