From 82fac326c5981a85233b8ae7e0d7ec8fda432963 Mon Sep 17 00:00:00 2001 From: jdess <4703565+jdess@users.noreply.github.com> Date: Fri, 24 Jul 2020 19:35:27 +0200 Subject: [PATCH] [C++] Fix compiler error from deleted assignment operator (#6036) (#6047) * [C++] Fix compiler error from deleted assignment operator (#6036) The assignment operator of the `buf_` member is deleted, we cannot call it from the assignment operator of the `TableKeyComparator` struct. => Also delete the assignment operator of the `TableKeyComparator` struct (already private anyhow). * [C++] Fix compiler error from deleted assignment operator (#6036) - fix extraneous semicolon The assignment operator of the `buf_` member is deleted, we cannot call it from the assignment operator of the `TableKeyComparator` struct. => Also delete the assignment operator of the `TableKeyComparator` struct (already private anyhow). --- include/flatbuffers/flatbuffers.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index 84110f6ad..ca5c658c5 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -1879,10 +1879,7 @@ class FlatBufferBuilder { vector_downward &buf_; private: - TableKeyComparator &operator=(const TableKeyComparator &other) { - buf_ = other.buf_; - return *this; - } + FLATBUFFERS_DELETE_FUNC(TableKeyComparator &operator=(const TableKeyComparator &other)) }; /// @endcond