-
Notifications
You must be signed in to change notification settings - Fork 288
disable copy constructor and copy assignment #980
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is currently unsafe about it?
It holds internal pointers to index members |
Which, BTW, is also incompatible with move. That should also be disabled. |
Could you please elaborate a scenario for problem of move? thanks! |
Simplification of what's going on:
|
It is a great example, but could it happen in the table class? disable move will make hard for utility functions. |
Like I said above, kv_table does this. It's part of how it keeps track of indexes. |
okay, then, will disable the move. |
no permission to merge, submitted tick for permission, https://blockone.freshservice.com/support/tickets/15178 |
@b1bart could you give another review, the merge is blocked by the request change, thanks, |
Due to the way those types are initialized, it is not safe to allow the copy constructor or copy-assignment operator on the kv table type.
Change Description
API Changes
Documentation Additions
Doc team, please make sure our examples were not using these accidentally, thanks.