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

Unified Diff: base/bind_internal.h

Issue 1774443002: Replace template_util.h stuff with C++11 <type_traits> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert unrelated whitespace change Created 4 years, 9 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 | « base/bind_helpers.h ('k') | base/callback.h » ('j') | 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 f296bbcc353f10e48a18f1113857aff8b0221a1d..ed059d4824e964ffa97ea858e641eb43a741a327 100644
--- a/base/bind_internal.h
+++ b/base/bind_internal.h
@@ -68,7 +68,7 @@ namespace internal {
// Implementation note: This non-specialized case handles zero-arity case only.
// Non-zero-arity cases should be handled by the specialization below.
template <typename List>
-struct HasNonConstReferenceItem : false_type {};
+struct HasNonConstReferenceItem : std::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
@@ -76,7 +76,7 @@ struct HasNonConstReferenceItem : false_type {};
template <typename T, typename... Args>
struct HasNonConstReferenceItem<TypeList<T, Args...>>
: std::conditional<is_non_const_reference<T>::value,
- true_type,
+ std::true_type,
HasNonConstReferenceItem<TypeList<Args...>>>::type {};
// HasRefCountedTypeAsRawPtr selects true_type when any of the |Args| is a raw
@@ -84,7 +84,7 @@ struct HasNonConstReferenceItem<TypeList<T, Args...>>
// Implementation note: This non-specialized case handles zero-arity case only.
// Non-zero-arity cases should be handled by the specialization below.
template <typename... Args>
-struct HasRefCountedTypeAsRawPtr : false_type {};
+struct HasRefCountedTypeAsRawPtr : std::false_type {};
// Implementation note: Select true_type if the first parameter is a raw pointer
// to a RefCounted type. Otherwise, skip the first parameter and check rest of
@@ -92,7 +92,7 @@ struct HasRefCountedTypeAsRawPtr : false_type {};
template <typename T, typename... Args>
struct HasRefCountedTypeAsRawPtr<T, Args...>
: std::conditional<NeedsScopedRefptrButGetsRawPtr<T>::value,
- true_type,
+ std::true_type,
HasRefCountedTypeAsRawPtr<Args...>>::type {};
// BindsArrayToFirstArg selects true_type when |is_method| is true and the first
@@ -101,11 +101,11 @@ struct HasRefCountedTypeAsRawPtr<T, Args...>
// zero-arity case only. Other cases should be handled by the specialization
// below.
template <bool is_method, typename... Args>
-struct BindsArrayToFirstArg : false_type {};
+struct BindsArrayToFirstArg : std::false_type {};
template <typename T, typename... Args>
struct BindsArrayToFirstArg<true, T, Args...>
- : is_array<typename std::remove_reference<T>::type> {};
+ : std::is_array<typename std::remove_reference<T>::type> {};
// HasRefCountedParamAsRawPtr is the same to HasRefCountedTypeAsRawPtr except
// when |is_method| is true HasRefCountedParamAsRawPtr skips the first argument.
@@ -170,7 +170,7 @@ class RunnableAdapter<R(T::*)(Args...)> {
// MSVC 2013 doesn't support Type Alias of function types.
// Revisit this after we update it to newer version.
typedef R RunType(T*, Args...);
- using IsMethod = true_type;
+ using IsMethod = std::true_type;
explicit RunnableAdapter(R(T::*method)(Args...))
: method_(method) {
@@ -190,7 +190,7 @@ template <typename R, typename T, typename... Args>
class RunnableAdapter<R(T::*)(Args...) const> {
public:
using RunType = R(const T*, Args...);
- using IsMethod = true_type;
+ using IsMethod = std::true_type;
explicit RunnableAdapter(R(T::*method)(Args...) const)
: method_(method) {
@@ -322,7 +322,7 @@ struct InvokeHelper<true, ReturnType, Runnable> {
// WeakCalls are only supported for functions with a void return type.
// Otherwise, the function result would be undefined if the the WeakPtr<>
// is invalidated.
- static_assert(is_void<ReturnType>::value,
+ static_assert(std::is_void<ReturnType>::value,
"weak_ptrs can only bind to methods without return values");
};
« no previous file with comments | « base/bind_helpers.h ('k') | base/callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698