Add a move assignment operator to ParseTree

Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404 2022-02-06 19:51:23 +01:00
parent a45902c9b2
commit 0b3109c989
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 0 deletions

View File

@ -86,6 +86,7 @@ public:
ParseTree(): subComponents() {}; ParseTree(): subComponents() {};
IS_PARSECOMPONENT constexpr explicit ParseTree(const T& element): ParseTree() { addComponent(element); } IS_PARSECOMPONENT constexpr explicit ParseTree(const T& element): ParseTree() { addComponent(element); }
IS_PARSECOMPONENT constexpr ParseTree(const initializer_list<T>& elements): ParseTree() { addAllComponents(elements); } IS_PARSECOMPONENT constexpr ParseTree(const initializer_list<T>& elements): ParseTree() { addAllComponents(elements); }
ParseTree& operator=(ParseTree&& parseTree) noexcept { subComponents = move(parseTree.subComponents); return *this; }
ParseTree(ParseTree&& parseTree) noexcept: subComponents(move(parseTree.subComponents)) {} ParseTree(ParseTree&& parseTree) noexcept: subComponents(move(parseTree.subComponents)) {}
ParseTree(const ParseTree& parseTree) = delete; ParseTree(const ParseTree& parseTree) = delete;
}; };