[libcxx-commits] [PATCH] D136868: [libc++][math.h] Remove unnecessary uses of __promote

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 27 16:06:05 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf7b8f7273b0e: [libc++][math.h] Remove unnecessary uses of __promote (authored by philnik).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136868/new/

https://reviews.llvm.org/D136868

Files:
  libcxx/include/math.h


Index: libcxx/include/math.h
===================================================================
--- libcxx/include/math.h
+++ libcxx/include/math.h
@@ -333,7 +333,7 @@
 typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
 signbit(_A1 __x) _NOEXCEPT
 {
-    return __libcpp_signbit((typename std::__promote<_A1>::type)__x);
+    return __libcpp_signbit(__x);
 }
 
 template <class _A1>
@@ -357,7 +357,7 @@
 typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
 signbit(_A1 __x) _NOEXCEPT
 {
-  return ::signbit(static_cast<typename std::__promote<_A1>::type>(__x));
+  return ::signbit(__x);
 }
 
 template <class _A1>
@@ -400,7 +400,7 @@
 typename std::enable_if<std::is_floating_point<_A1>::value, int>::type
 fpclassify(_A1 __x) _NOEXCEPT
 {
-    return __libcpp_fpclassify((typename std::__promote<_A1>::type)__x);
+    return __libcpp_fpclassify(__x);
 }
 
 template <class _A1>
@@ -416,7 +416,7 @@
 typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
 fpclassify(_A1 __x) _NOEXCEPT
 {
-  return ::fpclassify(static_cast<typename std::__promote<_A1>::type>(__x));
+  return ::fpclassify(__x);
 }
 
 template <class _A1>
@@ -540,7 +540,7 @@
 typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
 isnan(_A1 __x) _NOEXCEPT
 {
-    return __libcpp_isnan((typename std::__promote<_A1>::type)__x);
+    return __libcpp_isnan(__x);
 }
 
 template <class _A1>
@@ -588,7 +588,7 @@
 typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
 isnormal(_A1 __x) _NOEXCEPT
 {
-    return __libcpp_isnormal((typename std::__promote<_A1>::type)__x);
+    return __libcpp_isnormal(__x);
 }
 
 template <class _A1>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136868.471316.patch
Type: text/x-patch
Size: 1695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221027/4cf85a86/attachment.bin>


More information about the libcxx-commits mailing list