@@ -1100,18 +1100,38 @@ inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> pow(const complex<_Tp>& __x, const com
11001100 return std::exp (__y * std::log (__x));
11011101}
11021102
1103+ # if _LIBCPP_STD_VER >= 26
1104+ template <class _Tp , class _Up , __enable_if_t <is_floating_point<_Tp>::value && is_floating_point<_Up>::value, int > = 0 >
1105+ inline _LIBCPP_HIDE_FROM_ABI complex <typename __promote<_Tp, conditional_t <is_integral_v<_Up>, double , _Up>>::type>
1106+ pow (const complex <_Tp>& __x, const complex <_Up>& __y) {
1107+ using _Yp = conditional_t <is_integral_v<_Up>, double , _Up>;
1108+ typedef complex <typename __promote<_Tp, _Yp>::type> result_type;
1109+ return std::pow (result_type (__x), result_type (__y));
1110+ }
1111+ # else
11031112template <class _Tp , class _Up , __enable_if_t <is_floating_point<_Tp>::value && is_floating_point<_Up>::value, int > = 0 >
11041113inline _LIBCPP_HIDE_FROM_ABI complex <typename __promote<_Tp, _Up>::type>
11051114pow (const complex <_Tp>& __x, const complex <_Up>& __y) {
11061115 typedef complex <typename __promote<_Tp, _Up>::type> result_type;
11071116 return std::pow (result_type (__x), result_type (__y));
11081117}
1118+ # endif
11091119
1120+ # if _LIBCPP_STD_VER >= 26
1121+ template <class _Tp , class _Up , __enable_if_t <is_floating_point<_Tp>::value && is_arithmetic<_Up>::value, int > = 0 >
1122+ inline _LIBCPP_HIDE_FROM_ABI complex <typename __promote<_Tp, conditional_t <is_integral_v<_Up>, double , _Up>>::type>
1123+ pow (const complex <_Tp>& __x, const _Up& __y) {
1124+ using _Yp = conditional_t <is_integral_v<_Up>, double , _Up>;
1125+ typedef complex <typename __promote<_Tp, _Yp>::type> result_type;
1126+ return std::pow (result_type (__x), result_type (__y));
1127+ }
1128+ # else
11101129template <class _Tp , class _Up , __enable_if_t <is_floating_point<_Tp>::value && is_arithmetic<_Up>::value, int > = 0 >
11111130inline _LIBCPP_HIDE_FROM_ABI complex <typename __promote<_Tp, _Up>::type> pow (const complex <_Tp>& __x, const _Up& __y) {
11121131 typedef complex <typename __promote<_Tp, _Up>::type> result_type;
11131132 return std::pow (result_type (__x), result_type (__y));
11141133}
1134+ # endif
11151135
11161136template <class _Tp , class _Up , __enable_if_t <is_arithmetic<_Tp>::value && is_floating_point<_Up>::value, int > = 0 >
11171137inline _LIBCPP_HIDE_FROM_ABI complex <typename __promote<_Tp, _Up>::type> pow (const _Tp& __x, const complex <_Up>& __y) {
0 commit comments