styleguide: Allow enable_if, conditional, and other type_traits.
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/1457673002
Cr-Commit-Position: refs/heads/master@{#360310}
CrOS-Libchrome-Original-Commit: c52317fc311d2193dc880f5b4ce09b30c8d90269
diff --git a/base/bind_internal.h b/base/bind_internal.h
index e053218..1cb1684 100644
--- a/base/bind_internal.h
+++ b/base/bind_internal.h
@@ -5,6 +5,8 @@
#ifndef BASE_BIND_INTERNAL_H_
#define BASE_BIND_INTERNAL_H_
+#include <type_traits>
+
#include "base/bind_helpers.h"
#include "base/callback_internal.h"
#include "base/memory/raw_scoped_refptr_mismatch_checker.h"
@@ -77,9 +79,9 @@
// recursively.
template <typename R, typename T, typename... Args>
struct HasNonConstReferenceParam<R(T, Args...)>
- : SelectType<is_non_const_reference<T>::value,
- true_type,
- HasNonConstReferenceParam<R(Args...)>>::Type {};
+ : std::conditional<is_non_const_reference<T>::value,
+ true_type,
+ HasNonConstReferenceParam<R(Args...)>>::type {};
// HasRefCountedTypeAsRawPtr selects true_type when any of the |Args| is a raw
// pointer to a RefCounted type.
@@ -93,9 +95,9 @@
// parameters recursively.
template <typename T, typename... Args>
struct HasRefCountedTypeAsRawPtr<T, Args...>
- : SelectType<NeedsScopedRefptrButGetsRawPtr<T>::value,
- true_type,
- HasRefCountedTypeAsRawPtr<Args...>>::Type {};
+ : std::conditional<NeedsScopedRefptrButGetsRawPtr<T>::value,
+ true_type,
+ HasRefCountedTypeAsRawPtr<Args...>>::type {};
// BindsArrayToFirstArg selects true_type when |is_method| is true and the first
// item of |Args| is an array type.