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

Unified Diff: include/private/SkTLogic.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 | « include/core/SkRefCnt.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/private/SkTLogic.h
diff --git a/include/private/SkTLogic.h b/include/private/SkTLogic.h
index 298033ad462e75e29917d960b58b6a1201bd81ae..c352b8744a5ac4747ee80620f35885a956674099 100644
--- a/include/private/SkTLogic.h
+++ b/include/private/SkTLogic.h
@@ -83,29 +83,6 @@ template <typename T> using underlying_type = std::underlying_type<T>;
#endif
template <typename T> using underlying_type_t = typename skstd::underlying_type<T>::type;
-template <typename S, typename D,
- bool=std::is_void<S>::value || is_function<D>::value || std::is_array<D>::value>
-struct is_convertible_detector {
- static const/*expr*/ bool value = std::is_void<D>::value;
-};
-template <typename S, typename D> struct is_convertible_detector<S, D, false> {
- using yes_type = uint8_t;
- using no_type = uint16_t;
-
- template <typename To> static void param_convertable_to(To);
-
- template <typename From, typename To>
- static decltype(param_convertable_to<To>(std::declval<From>()), yes_type()) convertible(int);
-
- template <typename, typename> static no_type convertible(...);
-
- static const/*expr*/ bool value = sizeof(convertible<S, D>(0)) == sizeof(yes_type);
-};
-// std::is_convertable is known to be broken (not work with incomplete types) in Android clang NDK.
-// This is currently what prevents us from using std::unique_ptr.
-template<typename S, typename D> struct is_convertible
- : bool_constant<is_convertible_detector<S, D>::value> {};
-
} // namespace skstd
// The sknonstd namespace contains things we would like to be proposed and feel std-ish.
« no previous file with comments | « include/core/SkRefCnt.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698