Rework MSE impl passing of params by const& to be by value where ownership is transferred |
|
Issue descriptionIf callee needs to own the param, or if it's making a copy of the param, it's "taking ownership" - even if caller continues to use the original; use pass-by-value. If caller no longer needs to use the param, it can use std::move with pass-by-value. If callee wants to reduce a copy in the pass-by-value case, it can use std::move. Why? See https://chromium-review.googlesource.com/c/chromium/src/+/1099935#message-a0630329edfa4b66e5bea2343a8585235cae8c6b. |
|
►
Sign in to add a comment |
|
Comment 1 by wolenetz@chromium.org
, Jun 14 2018