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

Unified Diff: base/bind.h

Issue 743853002: Bind: Use VariadicTemplates in bind_internal.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@05_combined
Patch Set: disable back nocompile tests Created 6 years 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 | « base/base.gypi ('k') | base/bind_helpers.h » ('j') | base/bind_helpers.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/bind.h
diff --git a/base/bind.h b/base/bind.h
index 7874656c6091f0af70438e334b3873e2c4b0e105..51be10dd7e65c0d4226ab4542cc346578cee8a0b 100644
--- a/base/bind.h
+++ b/base/bind.h
@@ -52,13 +52,14 @@ base::Callback<
typename internal::BindState<
typename internal::FunctorTraits<Functor>::RunnableType,
typename internal::FunctorTraits<Functor>::RunType,
- void()>::UnboundRunType>
+ internal::TypeList<>>::UnboundRunType>
Bind(Functor functor) {
// Typedefs for how to store and run the functor.
typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename internal::FunctorTraits<Functor>::RunType RunType;
- typedef internal::BindState<RunnableType, RunType, void()> BindState;
+ typedef internal::BindState<RunnableType, RunType,
+ internal::TypeList<>> BindState;
return Callback<typename BindState::UnboundRunType>(
new BindState(internal::MakeRunnable(functor)));
@@ -69,7 +70,8 @@ base::Callback<
typename internal::BindState<
typename internal::FunctorTraits<Functor>::RunnableType,
typename internal::FunctorTraits<Functor>::RunType,
- void(typename internal::CallbackParamTraits<Args>::StorageType...)>
+ internal::TypeList<
+ typename internal::CallbackParamTraits<Args>::StorageType...>>
::UnboundRunType>
Bind(Functor functor, const Args&... args) {
// Typedefs for how to store and run the functor.
@@ -101,8 +103,10 @@ Bind(Functor functor, const Args&... args) {
!internal::HasRefCountedParamAsRawPtr<is_method, Args...>::value,
"a_parameter_is_refcounted_type_and_needs_scoped_refptr");
- typedef internal::BindState<RunnableType, RunType,
- void(typename internal::CallbackParamTraits<Args>::StorageType...)>
+ typedef internal::BindState<
+ RunnableType, RunType,
+ internal::TypeList<
+ typename internal::CallbackParamTraits<Args>::StorageType...>>
BindState;
return Callback<typename BindState::UnboundRunType>(
« no previous file with comments | « base/base.gypi ('k') | base/bind_helpers.h » ('j') | base/bind_helpers.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698