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

Unified Diff: include/private/SkUniquePtr.h

Issue 1565283003: More <type_traits> for SkTLogic.h. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | « include/private/SkTLogic.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/private/SkUniquePtr.h
diff --git a/include/private/SkUniquePtr.h b/include/private/SkUniquePtr.h
index a8246398550fc6a6232230554bd7432136976705..c68184768e31e90f6a4d75e5ca9bb5ebfaebd69c 100644
--- a/include/private/SkUniquePtr.h
+++ b/include/private/SkUniquePtr.h
@@ -94,24 +94,25 @@ private:
public:
/*constexpr*/ unique_ptr() /*noexcept*/ : data() {
- static_assert(!is_pointer<deleter_type>::value, "Deleter is nullptr function pointer!");
+ static_assert(!std::is_pointer<deleter_type>::value, "Deleter nullptr function pointer!");
}
/*constexpr*/ unique_ptr(std::nullptr_t) /*noexcept*/ : unique_ptr() { }
explicit unique_ptr(pointer ptr) /*noexcept*/ : data(ptr, deleter_type()) {
- static_assert(!is_pointer<deleter_type>::value, "Deleter is nullptr function pointer!");
+ static_assert(!std::is_pointer<deleter_type>::value, "Deleter nullptr function pointer!");
}
unique_ptr(pointer ptr,
- conditional_t<is_reference<deleter_type>::value, deleter_type,const deleter_type&> d)
+ conditional_t<std::is_reference<deleter_type>::value,
+ deleter_type, const deleter_type&> d)
/*noexcept*/ : data(ptr, d)
{}
unique_ptr(pointer ptr, remove_reference_t<deleter_type>&& d) /*noexcept*/
: data(std::move(ptr), std::move(d))
{
- static_assert(!is_reference<deleter_type>::value,
+ static_assert(!std::is_reference<deleter_type>::value,
"Binding an rvalue reference deleter as an lvalue reference deleter is not allowed.");
}
@@ -122,8 +123,10 @@ public:
template <typename U, typename ThatD, typename = enable_if_t<
is_convertible<typename unique_ptr<U, ThatD>::pointer, pointer>::value &&
- !is_array<U>::value &&
- conditional_t<is_reference<D>::value, is_same<ThatD, D>, is_convertible<ThatD, D>>::value>>
+ !std::is_array<U>::value &&
+ conditional_t<std::is_reference<D>::value,
+ std::is_same<ThatD, D>,
+ is_convertible<ThatD, D>>::value>>
unique_ptr(unique_ptr<U, ThatD>&& that) /*noexcept*/
: data(that.release(), std::forward<ThatD>(that.get_deleter()))
{}
@@ -144,7 +147,7 @@ public:
template <typename U, typename ThatD> enable_if_t<
is_convertible<typename unique_ptr<U, ThatD>::pointer, pointer>::value &&
- !is_array<U>::value,
+ !std::is_array<U>::value,
unique_ptr&> operator=(unique_ptr<U, ThatD>&& that) /*noexcept*/ {
reset(that.release());
get_deleter() = std::forward<ThatD>(that.get_deleter());
@@ -264,24 +267,25 @@ private:
public:
/*constexpr*/ unique_ptr() /*noexcept*/ : data() {
- static_assert(!is_pointer<deleter_type>::value, "Deleter is nullptr function pointer!");
+ static_assert(!std::is_pointer<deleter_type>::value, "Deleter nullptr function pointer!");
}
/*constexpr*/ unique_ptr(std::nullptr_t) /*noexcept*/ : unique_ptr() { }
explicit unique_ptr(pointer ptr) /*noexcept*/ : data(ptr, deleter_type()) {
- static_assert(!is_pointer<deleter_type>::value, "Deleter is nullptr function pointer!");
+ static_assert(!std::is_pointer<deleter_type>::value, "Deleter nullptr function pointer!");
}
unique_ptr(pointer ptr,
- conditional_t<is_reference<deleter_type>::value, deleter_type,const deleter_type&> d)
+ conditional_t<std::is_reference<deleter_type>::value,
+ deleter_type, const deleter_type&> d)
/*noexcept*/ : data(ptr, d)
{}
unique_ptr(pointer ptr, remove_reference_t<deleter_type>&& d) /*noexcept*/
: data(std::move(ptr), std::move(d))
{
- static_assert(!is_reference<deleter_type>::value,
+ static_assert(!std::is_reference<deleter_type>::value,
"Binding an rvalue reference deleter as an lvalue reference deleter is not allowed.");
}
« no previous file with comments | « include/private/SkTLogic.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698