-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Remove complicated syntax in argument_loader::call() #2044
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
|
The reason for the rvalue qualification on the methods is that |
Actually, the caller context isn't an rvalue as |
I'm talking about the caller of |
I think I am confused because |
There doesn't seem to be the need for std::move(*this).
1286ba3
to
5deb072
Compare
I think you misunderstood me; I probably wasn't sufficiently clear:
|
I deliberately removed all |
They are not required for compilation, but they serve a significant purpose on the public method: they signal that this method leaves the object in an undefined state (with the internal data moved away), and prevent it from being called in an lvalue context where that would be inappropriate. There currently is no such call, of course, and that's the point: such a call would intentionally fail to compile, but if you remove the |
(If you want to go the other way and add |
That's fine with me too. Hence, I filed a new PR #2057 and will close this one here. |
There doesn't seem to be the need for
std::move(*this)
.