Index: base/bind.h |
diff --git a/base/bind.h b/base/bind.h |
index c6b73936a638229fc24b63e15435dcb7bf7c8258..770e45706b02da7a041f4415bbd387f47f50e1e4 100644 |
--- a/base/bind.h |
+++ b/base/bind.h |
@@ -6,6 +6,7 @@ |
#define BASE_BIND_H_ |
#include "base/bind_internal.h" |
+#include "base/callback_internal.h" |
// ----------------------------------------------------------------------------- |
// Usage documentation |
@@ -51,8 +52,9 @@ |
typename internal::BindState< |
typename internal::FunctorTraits<Functor>::RunnableType, |
typename internal::FunctorTraits<Functor>::RunType, |
- typename std::decay<Args>::type...>::UnboundRunType> |
-Bind(Functor functor, Args&&... args) { |
+ typename internal::CallbackParamTraits<Args>::StorageType...> |
+ ::UnboundRunType> |
+Bind(Functor functor, const Args&... args) { |
// Type aliases for how to store and run the functor. |
using RunnableType = typename internal::FunctorTraits<Functor>::RunnableType; |
using RunType = typename internal::FunctorTraits<Functor>::RunType; |
@@ -87,11 +89,11 @@ |
"a parameter is a refcounted type and needs scoped_refptr"); |
using BindState = internal::BindState< |
- RunnableType, RunType, typename std::decay<Args>::type...>; |
+ RunnableType, RunType, |
+ typename internal::CallbackParamTraits<Args>::StorageType...>; |
return Callback<typename BindState::UnboundRunType>( |
- new BindState(internal::MakeRunnable(functor), |
- std::forward<Args>(args)...)); |
+ new BindState(internal::MakeRunnable(functor), args...)); |
} |
} // namespace base |