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

Unified Diff: third_party/WebKit/Source/wtf/TypeTraits.cpp

Issue 1493913004: Remove IsPointerConvertible trait and hacks and just use std::is_base_of. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix #if cond Created 5 years 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 | « third_party/WebKit/Source/wtf/TypeTraits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/TypeTraits.cpp
diff --git a/third_party/WebKit/Source/wtf/TypeTraits.cpp b/third_party/WebKit/Source/wtf/TypeTraits.cpp
index 5f09783d37af760639cf88b1b58c167e35014ab8..718fa947aa987188407aaf06c12794423cdc02e8 100644
--- a/third_party/WebKit/Source/wtf/TypeTraits.cpp
+++ b/third_party/WebKit/Source/wtf/TypeTraits.cpp
@@ -114,12 +114,6 @@ static_assert(!IsConvertibleToInteger<const char*>::value, "const char* should n
static_assert(!IsConvertibleToInteger<volatile char*>::value, "volatile char* should not be convertible to integer");
static_assert(!IsConvertibleToInteger<IsConvertibleToInteger<bool>>::value, "struct should not be convertible to integer");
-static_assert((IsPointerConvertible<int, int>::Value), "pointers to the same type should be convertible");
-static_assert((!IsPointerConvertible<int, unsigned>::Value), "int pointers should not be convertible to unsigned pointers");
-static_assert((IsPointerConvertible<int, const int>::Value), "int pointers should be convertible to const int pointers");
-static_assert((!IsPointerConvertible<const int, int>::Value), "const int* should not be convertible to int*");
-static_assert((IsPointerConvertible<int, volatile int>::Value), "int* should be convertible to volatile int*");
-
static_assert((IsSameType<bool, bool>::value), "bool should be the same type as itself");
static_assert((IsSameType<int*, int*>::value), "int* should be the same type as itself");
static_assert((!IsSameType<int, int*>::value), "int should not be the same type as int*");
@@ -138,8 +132,6 @@ static_assert((!IsSubclass<TestBaseClass<int>, TestDerivedClass>::value), "Base
static_assert((IsSubclassOfTemplate<TestDerivedClass, TestBaseClass>::value), "Derived class should be a subclass of template from its base");
static_assert((IsSameType<RemoveTemplate<TestBaseClass<int>, TestBaseClass>::Type, int>::value), "RemoveTemplate should remove the template typename from the type");
static_assert((IsSameType<RemoveTemplate<int, TestBaseClass>::Type, int>::value), "RemoveTemplate should not alter non-template types");
-static_assert((IsPointerConvertible<TestDerivedClass, TestBaseClass<int>>::Value), "Derived class pointers should be convertible to base class pointers");
-static_assert((!IsPointerConvertible<TestBaseClass<int>, TestDerivedClass>::Value), "Base class pointers should not be convertible to derived class pointers");
typedef int IntArray[];
typedef int IntArraySized[4];
« no previous file with comments | « third_party/WebKit/Source/wtf/TypeTraits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698