Skip to content

Commit

Permalink
[C++] Fix compiler error from deleted assignment operator (google#6036)…
Browse files Browse the repository at this point in the history
… (google#6047)

* [C++] Fix compiler error from deleted assignment operator (google#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 (google#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).
  • Loading branch information
jdess authored and ivannp committed Oct 2, 2020
1 parent 7695787 commit 4acef90
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions include/flatbuffers/flatbuffers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1940,10 +1940,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

Expand Down

0 comments on commit 4acef90

Please sign in to comment.