Index: base/callback.h |
diff --git a/base/callback.h b/base/callback.h |
index eada958591b245463eeb5a59d86f48b3d4a04239..c613890ef592bdbc5b6de4ca5c0706aaa0f0e3b6 100644 |
--- a/base/callback.h |
+++ b/base/callback.h |
@@ -123,7 +123,7 @@ |
// the rest when you execute the callback. |
// |
// void MyFunc(int i, const std::string& str) {} |
-// base::Callback<void(const std::string)> cb = base::Bind(&MyFunc, 23); |
+// base::Callback<void(const std::string&)> cb = base::Bind(&MyFunc, 23); |
// cb.Run("hello world"); |
// |
// When calling a function bound parameters are first, followed by unbound |
@@ -364,15 +364,16 @@ class Callback<R(void)> : public internal::CallbackBase { |
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT |
// return the exact Callback<> type. See base/bind.h for details. |
- template <typename Runnable, typename RunType, typename BoundArgsType> |
- Callback(internal::BindState<Runnable, RunType, BoundArgsType>* bind_state) |
+ template <typename Runnable, typename BindRunType, typename BoundArgsType> |
+ Callback(internal::BindState<Runnable, BindRunType, |
+ BoundArgsType>* bind_state) |
: CallbackBase(bind_state) { |
// Force the assignment to a local variable of PolymorphicInvoke |
// so the compiler will typecheck that the passed in Run() method has |
// the correct type. |
PolymorphicInvoke invoke_func = |
- &internal::BindState<Runnable, RunType, BoundArgsType> |
+ &internal::BindState<Runnable, BindRunType, BoundArgsType> |
::InvokerType::Run; |
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func); |
} |
@@ -403,15 +404,16 @@ class Callback<R(A1)> : public internal::CallbackBase { |
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT |
// return the exact Callback<> type. See base/bind.h for details. |
- template <typename Runnable, typename RunType, typename BoundArgsType> |
- Callback(internal::BindState<Runnable, RunType, BoundArgsType>* bind_state) |
+ template <typename Runnable, typename BindRunType, typename BoundArgsType> |
+ Callback(internal::BindState<Runnable, BindRunType, |
+ BoundArgsType>* bind_state) |
: CallbackBase(bind_state) { |
// Force the assignment to a local variable of PolymorphicInvoke |
// so the compiler will typecheck that the passed in Run() method has |
// the correct type. |
PolymorphicInvoke invoke_func = |
- &internal::BindState<Runnable, RunType, BoundArgsType> |
+ &internal::BindState<Runnable, BindRunType, BoundArgsType> |
::InvokerType::Run; |
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func); |
} |
@@ -443,15 +445,16 @@ class Callback<R(A1, A2)> : public internal::CallbackBase { |
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT |
// return the exact Callback<> type. See base/bind.h for details. |
- template <typename Runnable, typename RunType, typename BoundArgsType> |
- Callback(internal::BindState<Runnable, RunType, BoundArgsType>* bind_state) |
+ template <typename Runnable, typename BindRunType, typename BoundArgsType> |
+ Callback(internal::BindState<Runnable, BindRunType, |
+ BoundArgsType>* bind_state) |
: CallbackBase(bind_state) { |
// Force the assignment to a local variable of PolymorphicInvoke |
// so the compiler will typecheck that the passed in Run() method has |
// the correct type. |
PolymorphicInvoke invoke_func = |
- &internal::BindState<Runnable, RunType, BoundArgsType> |
+ &internal::BindState<Runnable, BindRunType, BoundArgsType> |
::InvokerType::Run; |
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func); |
} |
@@ -486,15 +489,16 @@ class Callback<R(A1, A2, A3)> : public internal::CallbackBase { |
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT |
// return the exact Callback<> type. See base/bind.h for details. |
- template <typename Runnable, typename RunType, typename BoundArgsType> |
- Callback(internal::BindState<Runnable, RunType, BoundArgsType>* bind_state) |
+ template <typename Runnable, typename BindRunType, typename BoundArgsType> |
+ Callback(internal::BindState<Runnable, BindRunType, |
+ BoundArgsType>* bind_state) |
: CallbackBase(bind_state) { |
// Force the assignment to a local variable of PolymorphicInvoke |
// so the compiler will typecheck that the passed in Run() method has |
// the correct type. |
PolymorphicInvoke invoke_func = |
- &internal::BindState<Runnable, RunType, BoundArgsType> |
+ &internal::BindState<Runnable, BindRunType, BoundArgsType> |
::InvokerType::Run; |
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func); |
} |
@@ -532,15 +536,16 @@ class Callback<R(A1, A2, A3, A4)> : public internal::CallbackBase { |
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT |
// return the exact Callback<> type. See base/bind.h for details. |
- template <typename Runnable, typename RunType, typename BoundArgsType> |
- Callback(internal::BindState<Runnable, RunType, BoundArgsType>* bind_state) |
+ template <typename Runnable, typename BindRunType, typename BoundArgsType> |
+ Callback(internal::BindState<Runnable, BindRunType, |
+ BoundArgsType>* bind_state) |
: CallbackBase(bind_state) { |
// Force the assignment to a local variable of PolymorphicInvoke |
// so the compiler will typecheck that the passed in Run() method has |
// the correct type. |
PolymorphicInvoke invoke_func = |
- &internal::BindState<Runnable, RunType, BoundArgsType> |
+ &internal::BindState<Runnable, BindRunType, BoundArgsType> |
::InvokerType::Run; |
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func); |
} |
@@ -582,15 +587,16 @@ class Callback<R(A1, A2, A3, A4, A5)> : public internal::CallbackBase { |
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT |
// return the exact Callback<> type. See base/bind.h for details. |
- template <typename Runnable, typename RunType, typename BoundArgsType> |
- Callback(internal::BindState<Runnable, RunType, BoundArgsType>* bind_state) |
+ template <typename Runnable, typename BindRunType, typename BoundArgsType> |
+ Callback(internal::BindState<Runnable, BindRunType, |
+ BoundArgsType>* bind_state) |
: CallbackBase(bind_state) { |
// Force the assignment to a local variable of PolymorphicInvoke |
// so the compiler will typecheck that the passed in Run() method has |
// the correct type. |
PolymorphicInvoke invoke_func = |
- &internal::BindState<Runnable, RunType, BoundArgsType> |
+ &internal::BindState<Runnable, BindRunType, BoundArgsType> |
::InvokerType::Run; |
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func); |
} |
@@ -635,15 +641,16 @@ class Callback<R(A1, A2, A3, A4, A5, A6)> : public internal::CallbackBase { |
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT |
// return the exact Callback<> type. See base/bind.h for details. |
- template <typename Runnable, typename RunType, typename BoundArgsType> |
- Callback(internal::BindState<Runnable, RunType, BoundArgsType>* bind_state) |
+ template <typename Runnable, typename BindRunType, typename BoundArgsType> |
+ Callback(internal::BindState<Runnable, BindRunType, |
+ BoundArgsType>* bind_state) |
: CallbackBase(bind_state) { |
// Force the assignment to a local variable of PolymorphicInvoke |
// so the compiler will typecheck that the passed in Run() method has |
// the correct type. |
PolymorphicInvoke invoke_func = |
- &internal::BindState<Runnable, RunType, BoundArgsType> |
+ &internal::BindState<Runnable, BindRunType, BoundArgsType> |
::InvokerType::Run; |
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func); |
} |
@@ -691,15 +698,16 @@ class Callback<R(A1, A2, A3, A4, A5, A6, A7)> : public internal::CallbackBase { |
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT |
// return the exact Callback<> type. See base/bind.h for details. |
- template <typename Runnable, typename RunType, typename BoundArgsType> |
- Callback(internal::BindState<Runnable, RunType, BoundArgsType>* bind_state) |
+ template <typename Runnable, typename BindRunType, typename BoundArgsType> |
+ Callback(internal::BindState<Runnable, BindRunType, |
+ BoundArgsType>* bind_state) |
: CallbackBase(bind_state) { |
// Force the assignment to a local variable of PolymorphicInvoke |
// so the compiler will typecheck that the passed in Run() method has |
// the correct type. |
PolymorphicInvoke invoke_func = |
- &internal::BindState<Runnable, RunType, BoundArgsType> |
+ &internal::BindState<Runnable, BindRunType, BoundArgsType> |
::InvokerType::Run; |
polymorphic_invoke_ = reinterpret_cast<InvokeFuncStorage>(invoke_func); |
} |