Merge pull request #2400 from kuzkry:custom-type-traits-enable_if

PiperOrigin-RevId: 264693952
diff --git a/googletest/include/gtest/gtest-matchers.h b/googletest/include/gtest/gtest-matchers.h
index 0548806..c10d650 100644
--- a/googletest/include/gtest/gtest-matchers.h
+++ b/googletest/include/gtest/gtest-matchers.h
@@ -300,7 +300,7 @@
   template <typename U>
   explicit MatcherBase(
       const MatcherInterface<U>* impl,
-      typename internal::EnableIf<!std::is_same<U, const U&>::value>::type* =
+      typename std::enable_if<!std::is_same<U, const U&>::value>::type* =
           nullptr)
       : impl_(new internal::MatcherInterfaceAdapter<U>(impl)) {}
 
@@ -336,7 +336,7 @@
   template <typename U>
   explicit Matcher(
       const MatcherInterface<U>* impl,
-      typename internal::EnableIf<!std::is_same<U, const U&>::value>::type* =
+      typename std::enable_if<!std::is_same<U, const U&>::value>::type* =
           nullptr)
       : internal::MatcherBase<T>(impl) {}
 
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h
index db81359..dfe7c78 100644
--- a/googletest/include/gtest/gtest.h
+++ b/googletest/include/gtest/gtest.h
@@ -292,7 +292,7 @@
   template <typename T>
   explicit AssertionResult(
       const T& success,
-      typename internal::EnableIf<
+      typename std::enable_if<
           !std::is_convertible<T, AssertionResult>::value>::type*
       /*enabler*/
       = nullptr)
diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h
index c3cb744..3313445 100644
--- a/googletest/include/gtest/internal/gtest-internal.h
+++ b/googletest/include/gtest/internal/gtest-internal.h
@@ -970,13 +970,6 @@
 template <typename C>
 struct IsRecursiveContainer : public IsRecursiveContainerImpl<C>::type {};
 
-// EnableIf<condition>::type is void when 'Cond' is true, and
-// undefined when 'Cond' is false.  To use SFINAE to make a function
-// overload only apply when a particular expression is true, add
-// "typename EnableIf<expression>::type* = 0" as the last parameter.
-template<bool> struct EnableIf;
-template<> struct EnableIf<true> { typedef void type; };  // NOLINT
-
 // Utilities for native arrays.
 
 // ArrayEq() compares two k-dimensional native arrays using the