-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Issue123movesupport #173
Issue123movesupport #173
Conversation
In general, it looks good to me (not tested yet). But I would prefer to merge this only after the default |
…mment in GenericDocument move assignment operator explaining why the static_cast is needed to move the base class.
This
...was necessary, because otherwise it would attempt to call
All of the other classes contain the |
Good catch. ValueType::operator=(std::forward<ValueType>(rhs)); Ok for skipping the allocator move (my misconception). Thanks for testing Thanks for your effort! This should fix #123. 👍 |
I've made the |
Thanks! From my side, it's good for merging now. 👍 |
Unless someone else has any suggestions to make, I don't plan on making any further changes for this pull request. |
I have done some research into the proper, idiomatic way of using
See:
So while:
happens to work correctly within the context of That line should really be:
because we want to unconditionally cast Unless there are compelling reasons why I shouldn't, I'd like to change the
|
I humbly disagree that A direct cast to But at the end of the day, I don't care much. NB: Herb Sutter and others suggest the name "forwarding reference" instead of "universal reference" (see Herb's talk at CppCon'14). |
I don't care much either whether it's |
I am not very familiar with C++11 actually. |
Implemented C++11 move semantics for GenericDocument, as well as related unit tests. This is related to issue #123.