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

Unified Diff: base/bind_internal.h

Issue 1512833002: Remove unbound base::Bind overload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge back Created 5 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
« base/bind_helpers.h ('K') | « base/bind_helpers.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/bind_internal.h
diff --git a/base/bind_internal.h b/base/bind_internal.h
index c6832e6a479ed3da0a386855327de207e6fedca6..d8d5ee6c2d1e608228a8b8fdd37385fca155d2db 100644
--- a/base/bind_internal.h
+++ b/base/bind_internal.h
@@ -71,17 +71,17 @@ namespace internal {
// |Sig| is a non-const reference.
// Implementation note: This non-specialized case handles zero-arity case only.
// Non-zero-arity cases should be handled by the specialization below.
-template <typename Sig>
-struct HasNonConstReferenceParam : false_type {};
+template <typename List>
+struct HasNonConstReferenceItem : false_type {};
// Implementation note: Select true_type if the first parameter is a non-const
// reference. Otherwise, skip the first parameter and check rest of parameters
// recursively.
-template <typename R, typename T, typename... Args>
-struct HasNonConstReferenceParam<R(T, Args...)>
dcheng 2015/12/14 19:26:46 I have a dumb question: why can't we just add a te
tzik 2015/12/15 05:55:09 Add specialization for R() and remove the base cas
+template <typename T, typename... Args>
+struct HasNonConstReferenceItem<TypeList<T, Args...>>
: std::conditional<is_non_const_reference<T>::value,
true_type,
- HasNonConstReferenceParam<R(Args...)>>::type {};
+ HasNonConstReferenceItem<TypeList<Args...>>>::type {};
// HasRefCountedTypeAsRawPtr selects true_type when any of the |Args| is a raw
// pointer to a RefCounted type.
« base/bind_helpers.h ('K') | « base/bind_helpers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698