Chromium Code Reviews| Index: base/bind_internal.h |
| diff --git a/base/bind_internal.h b/base/bind_internal.h |
| index ac7cd0098787b97ba8d14d35bf068311fade086d..ce6b5d67c6e365e40fb707de03f926d2d1b0129d 100644 |
| --- a/base/bind_internal.h |
| +++ b/base/bind_internal.h |
| @@ -104,7 +104,8 @@ template <bool is_method, typename... Args> |
| struct BindsArrayToFirstArg : false_type {}; |
| template <typename T, typename... Args> |
| -struct BindsArrayToFirstArg<true, T, Args...> : is_array<T> {}; |
| +struct BindsArrayToFirstArg<true, T, Args...> |
| + : is_array<typename std::remove_reference<T>::type> {}; |
| // HasRefCountedParamAsRawPtr is the same to HasRefCountedTypeAsRawPtr except |
| // when |is_method| is true HasRefCountedParamAsRawPtr skips the first argument. |
| @@ -401,11 +402,12 @@ struct BindState<Runnable, R(Args...), BoundArgs...> final |
| InvokeHelperType, UnboundForwardRunType>; |
| using UnboundRunType = MakeFunctionType<R, UnboundArgs>; |
| - BindState(const Runnable& runnable, const BoundArgs&... bound_args) |
| + template <typename... ForwardArgs> |
| + BindState(const Runnable& runnable, ForwardArgs&&... bound_args) |
|
danakj
2016/01/28 23:01:00
Just as a quick sanity check.. does this have a vi
tzik
2016/02/01 15:00:16
Good point. Yes, this increases the stripped binar
|
| : BindStateBase(&Destroy), |
| runnable_(runnable), |
| ref_(bound_args...), |
| - bound_args_(bound_args...) {} |
| + bound_args_(std::forward<ForwardArgs>(bound_args)...) {} |
| RunnableType runnable_; |
| MaybeScopedRefPtr<HasIsMethodTag<Runnable>::value, BoundArgs...> ref_; |