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

Unified Diff: base/memory/raw_scoped_refptr_mismatch_checker.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: 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
Index: base/memory/raw_scoped_refptr_mismatch_checker.h
diff --git a/base/memory/raw_scoped_refptr_mismatch_checker.h b/base/memory/raw_scoped_refptr_mismatch_checker.h
index 1e88b4874f2ec229731e65c83a460fd63220e4d0..d1dda238f324bbb65e1b8fcf9c0bec1d1c07f15f 100644
--- a/base/memory/raw_scoped_refptr_mismatch_checker.h
+++ b/base/memory/raw_scoped_refptr_mismatch_checker.h
@@ -5,9 +5,10 @@
#ifndef BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_
#define BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_
+#include <tuple>
+#include <type_traits>
+
#include "base/memory/ref_counted.h"
-#include "base/template_util.h"
-#include "base/tuple.h"
#include "build/build_config.h"
// It is dangerous to post a task with a T* argument where T is a subtype of
@@ -27,16 +28,16 @@ template <typename T>
struct NeedsScopedRefptrButGetsRawPtr {
#if defined(OS_WIN)
danakj 2016/03/08 00:23:35 Is this still needed?
tzik 2016/03/08 13:13:51 Removed.
enum {
- value = base::false_type::value
+ value = std::false_type::value
};
#else
enum {
// Human readable translation: you needed to be a scoped_refptr if you are a
// raw pointer type and are convertible to a RefCounted(Base|ThreadSafeBase)
// type.
- value = (is_pointer<T>::value &&
- (is_convertible<T, subtle::RefCountedBase*>::value ||
- is_convertible<T, subtle::RefCountedThreadSafeBase*>::value))
+ value = (std::is_pointer<T>::value &&
+ (std::is_convertible<T, subtle::RefCountedBase*>::value ||
+ std::is_convertible<T, subtle::RefCountedThreadSafeBase*>::value))
};
#endif
};
« no previous file with comments | « base/callback_internal.h ('k') | base/memory/scoped_ptr.h » ('j') | base/memory/weak_ptr.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698