From 0b3109c989358d36acb4c4e78ab8234162d64d6d Mon Sep 17 00:00:00 2001 From: Username404 Date: Sun, 6 Feb 2022 19:51:23 +0100 Subject: [PATCH] Add a move assignment operator to ParseTree Signed-off-by: Username404 --- src/headers/parsing/ParseComponents.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/headers/parsing/ParseComponents.hpp b/src/headers/parsing/ParseComponents.hpp index 6727ba0..8cc04f9 100644 --- a/src/headers/parsing/ParseComponents.hpp +++ b/src/headers/parsing/ParseComponents.hpp @@ -86,6 +86,7 @@ public: ParseTree(): subComponents() {}; IS_PARSECOMPONENT constexpr explicit ParseTree(const T& element): ParseTree() { addComponent(element); } IS_PARSECOMPONENT constexpr ParseTree(const initializer_list& elements): ParseTree() { addAllComponents(elements); } + ParseTree& operator=(ParseTree&& parseTree) noexcept { subComponents = move(parseTree.subComponents); return *this; } ParseTree(ParseTree&& parseTree) noexcept: subComponents(move(parseTree.subComponents)) {} ParseTree(const ParseTree& parseTree) = delete; };