aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/SkTLogic.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/private/SkTLogic.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/private/SkTLogic.h')
-rw-r--r--include/private/SkTLogic.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/include/private/SkTLogic.h b/include/private/SkTLogic.h
index 298033ad46..c352b8744a 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.