GCC: explicitely std::move to base::Optional instead of implicit conversion to...
GCC: explicitely std::move to base::Optional instead of implicit conversion to base::Optional in return GCC 7.2/7.3 complains in this pattern of code: base::Optional<Foo> Method() { ... Foo response; ... return response; } It seems it cannot properly resolve the implicit move to base::Optional, and ends up failing to compile. To avoid that, this change explicitely moves to base::Optional as return value: return base::Optional<Foo>(std::move(response)); Change-Id: Ic0390e1c31340dc34a71bb4175bd63a4631248d6 Reviewed-on: https://chromium-review.googlesource.com/944402 Commit-Queue: Victor Costan <pwnall@chromium.org> Reviewed-by:Matt Falkenhagen <falken@chromium.org> Reviewed-by:
Victor Costan <pwnall@chromium.org> Reviewed-by:
Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#541029}
Showing
Please register or sign in to comment