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

Unified Diff: include/core/SkRefCnt.h

Issue 1931003002: Remove skstd::is_convertible. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | include/private/SkTLogic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkRefCnt.h
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 46e69759cb38e994fea269dc654aebf315b05d1b..c45ed6bbf06f0d261f6efde6b696da538166b0dd 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -13,6 +13,7 @@
#include <atomic>
#include <functional>
#include <memory>
+#include <type_traits>
#include <utility>
#define SK_SUPPORT_TRANSITION_TO_SP_INTERFACES
@@ -271,7 +272,7 @@ public:
* created sk_sp both have a reference to it.
*/
sk_sp(const sk_sp<T>& that) : fPtr(SkSafeRef(that.get())) {}
- template <typename U, typename = skstd::enable_if_t<skstd::is_convertible<U*, T*>::value>>
+ template <typename U, typename = skstd::enable_if_t<std::is_convertible<U*, T*>::value>>
sk_sp(const sk_sp<U>& that) : fPtr(SkSafeRef(that.get())) {}
/**
@@ -280,7 +281,7 @@ public:
* No call to ref() or unref() will be made.
*/
sk_sp(sk_sp<T>&& that) : fPtr(that.release()) {}
- template <typename U, typename = skstd::enable_if_t<skstd::is_convertible<U*, T*>::value>>
+ template <typename U, typename = skstd::enable_if_t<std::is_convertible<U*, T*>::value>>
sk_sp(sk_sp<U>&& that) : fPtr(that.release()) {}
/**
@@ -308,7 +309,7 @@ public:
this->reset(SkSafeRef(that.get()));
return *this;
}
- template <typename U, typename = skstd::enable_if_t<skstd::is_convertible<U*, T*>::value>>
+ template <typename U, typename = skstd::enable_if_t<std::is_convertible<U*, T*>::value>>
sk_sp<T>& operator=(const sk_sp<U>& that) {
this->reset(SkSafeRef(that.get()));
return *this;
@@ -323,7 +324,7 @@ public:
this->reset(that.release());
return *this;
}
- template <typename U, typename = skstd::enable_if_t<skstd::is_convertible<U*, T*>::value>>
+ template <typename U, typename = skstd::enable_if_t<std::is_convertible<U*, T*>::value>>
sk_sp<T>& operator=(sk_sp<U>&& that) {
this->reset(that.release());
return *this;
« no previous file with comments | « no previous file | include/private/SkTLogic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698