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

Unified Diff: base/bind.h

Issue 8306008: base::Bind: Increase the arity to 7. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months 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 | « no previous file | base/bind.h.pump » ('j') | no next file with comments »
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 f023308eb55ec7421fcfac90200c276fc126dfcf..27c6d87a4f76cc0d9c5887c689e54e3207eaf1f2 100644
--- a/base/bind.h
+++ b/base/bind.h
@@ -95,6 +95,17 @@ Bind(Sig f, const P1& p1, const P2& p2, const P3& p3, const P4& p4,
f, p1, p2, p3, p4, p5, p6));
}
+template <typename Sig, typename P1, typename P2, typename P3, typename P4,
+ typename P5, typename P6, typename P7>
+internal::InvokerStorageHolder<internal::InvokerStorage7<Sig,P1, P2, P3, P4,
+ P5, P6, P7> >
+Bind(Sig f, const P1& p1, const P2& p2, const P3& p3, const P4& p4,
+ const P5& p5, const P6& p6, const P7& p7) {
+ return internal::MakeInvokerStorageHolder(
+ new internal::InvokerStorage7<Sig, P1, P2, P3, P4, P5, P6, P7>(
+ f, p1, p2, p3, p4, p5, p6, p7));
+}
+
// Specializations to allow binding all the free arguments in a
// pre-existing base::Callback<>. This does not give full support for
// currying, but is significantly simpler and addresses the use case
@@ -140,6 +151,15 @@ base::Closure Bind(const base::Callback<Sig>& callback, const P1& p1,
callback, p1, p2, p3, p4, p5, p6);
}
+template <typename Sig, typename P1, typename P2, typename P3, typename P4,
+ typename P5, typename P6, typename P7>
+base::Closure Bind(const base::Callback<Sig>& callback, const P1& p1,
+ const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6,
+ const P7& p7) {
+ return base::Bind(&internal::BindMoreFunc7<Sig, P1, P2, P3, P4, P5, P6, P7>,
+ callback, p1, p2, p3, p4, p5, p6, p7);
+}
+
} // namespace base
#endif // BASE_BIND_H_
« no previous file with comments | « no previous file | base/bind.h.pump » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698