File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
include/ccmath/internal/types Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ namespace ccm::types
220
220
// also raise FE_OVERFLOW and set ERANGE is debatable.
221
221
// TODO: Check what MSVC does for this case to match them when compiling with MSVC.
222
222
// This behavior matches Clang.
223
- if (ShouldSignalExceptions && support::fp::FPBits<T>(r).is_inf ()) { support::fenv::set_errno_if_required (ERANGE); }
223
+ if constexpr (ShouldSignalExceptions && support::fp::FPBits<T>(r).is_inf ()) { support::fenv::set_errno_if_required (ERANGE); }
224
224
225
225
return r;
226
226
}
@@ -291,7 +291,7 @@ namespace ccm::types
291
291
// "tininess" before or after rounding for base-2 formats, as long as
292
292
// the same choice is made for all operations.
293
293
// Our choice to check after rounding might not be the same as the hardware's.
294
- if (ShouldSignalExceptions && round_and_sticky)
294
+ if constexpr (ShouldSignalExceptions && round_and_sticky)
295
295
{
296
296
support::fenv::set_errno_if_required (ERANGE);
297
297
support::fenv::raise_except_if_required (FE_UNDERFLOW);
@@ -343,7 +343,7 @@ namespace ccm::types
343
343
template <typename T, typename = std::enable_if_t <std::is_floating_point_v<T> && (support::fp::FPBits<T>::fraction_length < Bits), void >>
344
344
explicit constexpr operator T () const
345
345
{
346
- return as<T, /* ShouldSignalExceptions= */ false >();
346
+ return as<T, false >();
347
347
}
348
348
349
349
constexpr mantissa_type as_mantissa_type () const
You can’t perform that action at this time.
0 commit comments