[libcxx-commits] [libcxx] [libc++] Simplify __promote (PR #136101)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 17 00:46:03 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions ,cpp,h -- libcxx/include/__math/copysign.h libcxx/include/__math/exponential_functions.h libcxx/include/__math/fdim.h libcxx/include/__math/fma.h libcxx/include/__math/hypot.h libcxx/include/__math/inverse_trigonometric_functions.h libcxx/include/__math/min_max.h libcxx/include/__math/modulo.h libcxx/include/__math/remainder.h libcxx/include/__math/rounding_functions.h libcxx/include/__math/traits.h libcxx/include/__type_traits/promote.h libcxx/include/cmath libcxx/include/complex libcxx/test/libcxx/numerics/complex.number/cmplx.over.pow.pass.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/include/complex b/libcxx/include/complex
index 102375aca..e9baec04d 100644
--- a/libcxx/include/complex
+++ b/libcxx/include/complex
@@ -1101,8 +1101,7 @@ inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> pow(const complex<_Tp>& __x, const com
 }
 
 template <class _Tp, class _Up, __enable_if_t<is_floating_point<_Tp>::value && is_floating_point<_Up>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI complex<__promote_t<_Tp, _Up> >
-pow(const complex<_Tp>& __x, const complex<_Up>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI complex<__promote_t<_Tp, _Up> > pow(const complex<_Tp>& __x, const complex<_Up>& __y) {
   typedef complex<__promote_t<_Tp, _Up> > result_type;
   return std::pow(result_type(__x), result_type(__y));
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/136101


More information about the libcxx-commits mailing list