| Index: base/bind.h
|
| diff --git a/base/bind.h b/base/bind.h
|
| index c6b73936a638229fc24b63e15435dcb7bf7c8258..3a20feb79116c3b95179d6bdd25fe5e7f859d41d 100644
|
| --- a/base/bind.h
|
| +++ b/base/bind.h
|
| @@ -46,12 +46,26 @@
|
|
|
| namespace base {
|
|
|
| +namespace internal {
|
| +
|
| +// Don't use Alias Template directly here to avoid a compile error on MSVC2013.
|
| +template <typename Functor, typename... Args>
|
| +struct MakeUnboundRunTypeImpl {
|
| + using Type =
|
| + typename BindState<
|
| + typename FunctorTraits<Functor>::RunnableType,
|
| + typename FunctorTraits<Functor>::RunType,
|
| + typename std::decay<Args>::type...>::UnboundRunType;
|
| +};
|
| +
|
| +} // namespace internal
|
| +
|
| +template <typename Functor, typename... Args>
|
| +using MakeUnboundRunType =
|
| + typename internal::MakeUnboundRunTypeImpl<Functor, Args...>::Type;
|
| +
|
| template <typename Functor, typename... Args>
|
| -base::Callback<
|
| - typename internal::BindState<
|
| - typename internal::FunctorTraits<Functor>::RunnableType,
|
| - typename internal::FunctorTraits<Functor>::RunType,
|
| - typename std::decay<Args>::type...>::UnboundRunType>
|
| +base::Callback<MakeUnboundRunType<Functor, Args...>>
|
| Bind(Functor functor, Args&&... args) {
|
| // Type aliases for how to store and run the functor.
|
| using RunnableType = typename internal::FunctorTraits<Functor>::RunnableType;
|
|
|