summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--absl/types/internal/span.h21
1 files changed, 1 insertions, 20 deletions
diff --git a/absl/types/internal/span.h b/absl/types/internal/span.h
index d653bb2c..344ad4db 100644
--- a/absl/types/internal/span.h
+++ b/absl/types/internal/span.h
@@ -99,28 +99,9 @@ bool LessThanImpl(SpanT<T> a, SpanT<T> b) {
return std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end());
}
-// The `IsConvertible` classes here are needed because of the
-// `std::is_convertible` bug in libcxx when compiled with GCC. This build
-// configuration is used by Android NDK toolchain. Reference link:
-// https://bugs.llvm.org/show_bug.cgi?id=27538.
-template <typename From, typename To>
-struct IsConvertibleHelper {
- private:
- static std::true_type testval(To);
- static std::false_type testval(...);
-
- public:
- using type = decltype(testval(std::declval<From>()));
-};
-
-template <typename From, typename To>
-struct IsConvertible : IsConvertibleHelper<From, To>::type {};
-
-// TODO(zhangxy): replace `IsConvertible` with `std::is_convertible` once the
-// older version of libcxx is not supported.
template <typename From, typename To>
using EnableIfConvertibleTo =
- typename std::enable_if<IsConvertible<From, To>::value>::type;
+ typename std::enable_if<std::is_convertible<From, To>::value>::type;
// IsView is true for types where the return type of .data() is the same for
// mutable and const instances. This isn't foolproof, but it's only used to