Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1652)

Unified Diff: base/bind_internal.h

Issue 2298133003: Support rvalue-reference IgnoreResult in base::Bind impl (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/bind_internal.h
diff --git a/base/bind_internal.h b/base/bind_internal.h
index 3d6ca09c41e4e31404a11bb16ad99a425bc6369c..83e000dacdb7b197ecfa26b149ab949e07a295fb 100644
--- a/base/bind_internal.h
+++ b/base/bind_internal.h
@@ -244,8 +244,9 @@ struct FunctorTraits<IgnoreResultHelper<T>> : FunctorTraits<T> {
template <typename IgnoreResultType, typename... RunArgs>
static void Invoke(IgnoreResultType&& ignore_result_helper,
RunArgs&&... args) {
- FunctorTraits<T>::Invoke(ignore_result_helper.functor_,
- std::forward<RunArgs>(args)...);
+ FunctorTraits<T>::Invoke(
+ std::forward<IgnoreResultType>(ignore_result_helper).functor_,
Yuta Kitamura 2016/08/31 09:38:21 Just to be sure: this change tries to make this ar
tzik 2016/08/31 09:51:11 Right. Updated the description for this.
+ std::forward<RunArgs>(args)...);
}
};
@@ -380,7 +381,7 @@ struct BindState final : BindStateBase {
template <typename ForwardFunctor, typename... ForwardBoundArgs>
explicit BindState(ForwardFunctor&& functor, ForwardBoundArgs&&... bound_args)
: BindStateBase(&Destroy),
- functor_(std::forward<ForwardFunctor>(functor)),
+ functor_(std::forward<ForwardFunctor>(functor)),
bound_args_(std::forward<ForwardBoundArgs>(bound_args)...) {
DCHECK(!IsNull(functor_));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698