aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRefCnt.h
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2016-04-28 11:18:07 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-28 11:18:07 -0700
commit801b44c45348144a483793e7b24f4d4092a4f74d (patch)
tree4c9b1f018096069c5946f02cdf82744c56c00eb0 /include/core/SkRefCnt.h
parentd1adec187069f9706e7311815e8232dd8307e995 (diff)
Remove skstd::is_convertible.
We should now be able to use std::is_convertible. TBR=reed@google.com This doesn't change any API, just where we get a type trait from. Review-Url: https://codereview.chromium.org/1931003002
Diffstat (limited to 'include/core/SkRefCnt.h')
-rw-r--r--include/core/SkRefCnt.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 46e69759cb..c45ed6bbf0 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;