Skip to content

Commit 07ddae7

Browse files
committed
Repair a long-known unreachable line
1 parent 405130a commit 07ddae7

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

  • include/boost/decimal/detail/cmath

include/boost/decimal/detail/cmath/pow.hpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,8 @@ constexpr auto pow(const T x, const T a) noexcept
212212
#endif
213213
else
214214
{
215-
if (fpc_a == FP_ZERO)
216-
{
217-
result = one;
218-
}
219215
#ifndef BOOST_DECIMAL_FAST_MATH
220-
else if (fpc_a == FP_INFINITE)
216+
if (fpc_a == FP_INFINITE)
221217
{
222218
result =
223219
(
@@ -226,8 +222,8 @@ constexpr auto pow(const T x, const T a) noexcept
226222
: one
227223
);
228224
}
229-
#endif
230225
else
226+
#endif
231227
{
232228
const T a_log_x { a * ::boost::decimal::log(x) };
233229

0 commit comments

Comments
 (0)