Index: base/callback_internal.h |
diff --git a/base/callback_internal.h b/base/callback_internal.h |
index b6353dc8e568449545d541f2dece3cabd2d55286..4b47bc7978db33f0946a9c30645d4b35f241751e 100644 |
--- a/base/callback_internal.h |
+++ b/base/callback_internal.h |
@@ -9,6 +9,7 @@ |
#define BASE_CALLBACK_INTERNAL_H_ |
#include <stddef.h> |
+#include <type_traits> |
#include "base/atomic_ref_count.h" |
#include "base/base_export.h" |
@@ -105,18 +106,6 @@ template <typename T> struct IsMoveOnlyType { |
!is_const<T>::value; |
}; |
-// Returns |Then| as SelectType::Type if |condition| is true. Otherwise returns |
-// |Else|. |
-template <bool condition, typename Then, typename Else> |
-struct SelectType { |
- typedef Then Type; |
-}; |
- |
-template <typename Then, typename Else> |
-struct SelectType<false, Then, Else> { |
- typedef Else Type; |
-}; |
- |
template <typename> |
struct CallbackParamTraitsForMoveOnlyType; |
@@ -140,9 +129,9 @@ struct CallbackParamTraitsForNonMoveOnlyType; |
// break passing of C-string literals. |
template <typename T> |
struct CallbackParamTraits |
- : SelectType<IsMoveOnlyType<T>::value, |
+ : std::conditional<IsMoveOnlyType<T>::value, |
CallbackParamTraitsForMoveOnlyType<T>, |
- CallbackParamTraitsForNonMoveOnlyType<T> >::Type { |
+ CallbackParamTraitsForNonMoveOnlyType<T>>::type { |
}; |
template <typename T> |