-
Notifications
You must be signed in to change notification settings - Fork 717
perf: mark move constructors and assignment operators as noexcept #10784
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
Conversation
|
Mathlib CI status (docs):
|
|
Reference manual CI status:
|
|
@eric-wieser Is the stage0 change an oversight? We can't merge it the standard way unless it is reverted |
|
It was indeed an oversight, now reverted. |
|
Note that this and #10815 conflict in a way that git won't pick up; if either is merged, the other will need a small patch to be correct. |
|
@eric-wieser Ok, feel free to update the other PR afterwards. Btw, I suspect a good amount of this code is dead; if you have a tool for that as well, let me know! |
…anprover#10784) Detected by https://clang.llvm.org/extra/clang-tidy/checks/performance/noexcept-move-constructor.html. This ensures constructions like `std::vector<object_ref>` call these operators instead of the copy ones, and do not do extra refcounting. Note that `optional` and `atomic` need something more complex using `noexcept()`, as they are templated.
Detected by https://clang.llvm.org/extra/clang-tidy/checks/performance/noexcept-move-constructor.html.
This ensures constructions like
std::vector<object_ref>call these operators instead of the copy ones, and do not do extra refcounting.Note that
optionalandatomicneed something more complex usingnoexcept(), as they are templated.