From 75823cc2755127e408ee944ffbc3863b0079fd01 Mon Sep 17 00:00:00 2001 From: Ivan Shynkarenka Date: Tue, 3 Dec 2019 01:10:09 +0300 Subject: [PATCH] [Clang 10]: definition of implicit copy constructor for 'TableKeyComparatoris deprecated #5649 (#5650) --- include/flatbuffers/flatbuffers.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index 94f78d9b4..9a4f7ccd7 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -1837,6 +1837,7 @@ class FlatBufferBuilder { /// @cond FLATBUFFERS_INTERNAL template struct TableKeyComparator { TableKeyComparator(vector_downward &buf) : buf_(buf) {} + TableKeyComparator(const TableKeyComparator &other) : buf_(other.buf_) {} bool operator()(const Offset &a, const Offset &b) const { auto table_a = reinterpret_cast(buf_.data_at(a.o)); auto table_b = reinterpret_cast(buf_.data_at(b.o)); @@ -1845,7 +1846,10 @@ class FlatBufferBuilder { vector_downward &buf_; private: - TableKeyComparator &operator=(const TableKeyComparator &); + TableKeyComparator &operator=(const TableKeyComparator &other) { + buf_ = other.buf_; + return *this; + } }; /// @endcond