Change std::abs from a template function to three overloads for float, double and long double.
llvm-svn: 156064
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 9acfc3af72594aaa828c411afe6be5d343ddd2a5
diff --git a/include/cmath b/include/cmath
index 026889f..76d7a82 100644
--- a/include/cmath
+++ b/include/cmath
@@ -648,10 +648,17 @@
// abs
-template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
-typename enable_if<is_floating_point<_A1>::value, _A1>::type
-abs(_A1 __x) {return fabs(__x);}
+float
+abs(float __x) {return fabsf(__x);}
+
+inline _LIBCPP_INLINE_VISIBILITY
+double
+abs(double __x) {return fabs(__x);}
+
+inline _LIBCPP_INLINE_VISIBILITY
+long double
+abs(long double __x) {return fabsl(__x);}
#ifndef __sun__