|
To fix this ticket we'd want to have calls of the following form to NetworkInterface::startCommand():
startCommand(someValue,
|
someRequest,
|
[capture things](ResponseStatus&& response) {
|
// do some stuff with the response from the remote server
|
}
|
So, we'd like the completion handler to take a ResponseStatus by && as shown above. However, the task executor uses a callback with the following format:
[capture some things](ResponseStatus&& response) {
|
...
|
auto anotherCallback = [response](...) {
|
remoteCommandFinished(..., std::move(response));
|
}
|
...
|
}
|
We want to pass 'response' by && all the way down through various callbacks, so we try to std::move() it along. However, this will not compile because we haven't captured 'response' by &&, we've captured it by const &:
auto anotherCallback = [response](...) {
|
If we could type the following then we'd be able to make this change:
auto anotherCallback = [std::move(response)](...) {
|
Sadly, we won't have move lambda captures until C++14, so I am closing this ticket as "Won't Fix."
|