| Index: base/memory/weak_ptr.h
|
| diff --git a/base/memory/weak_ptr.h b/base/memory/weak_ptr.h
|
| index 4e50c2776440c5126c31d829efa2983c0d5b8c0d..9ba5e25cfd0adab918a2e1e41d770e1a60c7edc3 100644
|
| --- a/base/memory/weak_ptr.h
|
| +++ b/base/memory/weak_ptr.h
|
| @@ -70,12 +70,13 @@
|
| #ifndef BASE_MEMORY_WEAK_PTR_H_
|
| #define BASE_MEMORY_WEAK_PTR_H_
|
|
|
| +#include <type_traits>
|
| +
|
| #include "base/base_export.h"
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/sequence_checker.h"
|
| -#include "base/template_util.h"
|
|
|
| namespace base {
|
|
|
| @@ -160,8 +161,8 @@ class SupportsWeakPtrBase {
|
| // function that makes calling this easier.
|
| template<typename Derived>
|
| static WeakPtr<Derived> StaticAsWeakPtr(Derived* t) {
|
| - typedef
|
| - is_convertible<Derived, internal::SupportsWeakPtrBase&> convertible;
|
| + using convertible =
|
| + std::is_convertible<Derived*, internal::SupportsWeakPtrBase*>;
|
| static_assert(convertible::value,
|
| "AsWeakPtr argument must inherit from SupportsWeakPtr");
|
| return AsWeakPtrImpl<Derived>(t, *t);
|
|
|