-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IAR ARM C++ Compiler V8.42.1.236 error from TableKeyComparator::operator= because vector_downward::operator= is deleted #6036
Comments
I'm curious that this problem has never come up before, since that assignment statement is indeed problematic. Agree that it would be best to delete the assignment operator. Why is it there, though? If noone is using it (if it passes CI), we can delete it. Alternatively, if there are users, simply make |
My guess is that the IAR compiler has a different approach to dealing with templates than some of the other compilers (e.g. Microsoft, GNU). Since I also don't see why the assignment operator is defined at all. Since it is declared Converting I'm not sure how to check the CI with the modification. If that helps, I can create a pull request and assume that this will then get pulled into the CI process before the PR would be accepted. Please let me know if you want me to create a pull request (and whether to go for the |
Yes, just make a PR that makes it into a deleted function. CI will run automatically. If it passes, we'll merge. It's possible someone will come out of the woodwork saying they relied on this function, if so, we can change it again then. |
Sounds good, I'll go ahead with the PR |
) * [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).
… (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).
Hello,
this has been observed with an older version of flatbuffers but is still valid in the version of
flatbuffers.h
from the (currently most recent) git commit #14baf45c90a076d405e75cfc41874ffff862fb72.When trying to compile a file which includes
flatbuffers.h
with the IAR C++ compiler from the Embedded Workbench (version 8.42.1.236) on Windows, I get the following error during the compilation:Checking
flatbuffers::vector_downward::operator=(flatbuffers::vector_downward const &)
confirms that this is a deleted function (fromflatbuffers\include\flatbuffers\flatbuffers.h
):A simple fix seems to use the same pattern and which also deletes the assignment operator from
TableKeyComparator
. Since the assignment operator is already private, this seems to be a fairly trivial and low-risk fix:The text was updated successfully, but these errors were encountered: