about summary refs log tree commit diff
path: root/absl/types/internal
diff options
context:
space:
mode:
Diffstat (limited to 'absl/types/internal')
-rw-r--r--absl/types/internal/variant.h28
1 files changed, 2 insertions, 26 deletions
diff --git a/absl/types/internal/variant.h b/absl/types/internal/variant.h
index 7db5e0535f68..7708e67cb14f 100644
--- a/absl/types/internal/variant.h
+++ b/absl/types/internal/variant.h
@@ -1062,32 +1062,6 @@ struct OverloadSet<> {
   static void Overload(...);
 };
 
-////////////////////////////////
-// Library Fundamentals V2 TS //
-////////////////////////////////
-
-// TODO(calabrese): Consider moving this to absl/meta/type_traits.h
-
-// The following is a rough implementation of parts of the detection idiom.
-// It is used for the comparison operator checks.
-
-template <class Enabler, class To, template <class...> class Op, class... Args>
-struct is_detected_convertible_impl {
-  using type = std::false_type;
-};
-
-template <class To, template <class...> class Op, class... Args>
-struct is_detected_convertible_impl<
-    absl::enable_if_t<std::is_convertible<Op<Args...>, To>::value>, To, Op,
-    Args...> {
-  using type = std::true_type;
-};
-
-// NOTE: This differs from library fundamentals by being lazy.
-template <class To, template <class...> class Op, class... Args>
-struct is_detected_convertible
-    : is_detected_convertible_impl<void, To, Op, Args...>::type {};
-
 template <class T>
 using LessThanResult = decltype(std::declval<T>() < std::declval<T>());
 
@@ -1107,6 +1081,8 @@ using EqualResult = decltype(std::declval<T>() == std::declval<T>());
 template <class T>
 using NotEqualResult = decltype(std::declval<T>() != std::declval<T>());
 
+using type_traits_internal::is_detected_convertible;
+
 template <class... T>
 using RequireAllHaveEqualT = absl::enable_if_t<
     absl::conjunction<is_detected_convertible<bool, EqualResult, T>...>::value,