Skip to content

Commit

Permalink
constexpr -> const for portability
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Mar 24, 2022
1 parent 7ffe87c commit 17dda58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/fmt/format-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ template <typename F> struct basic_fp {
"unsupported FP");
// Assume Float is in the format [sign][exponent][significand].
using carrier_uint = typename dragonbox::float_info<Float>::carrier_uint;
constexpr auto num_float_significand_bits =
const auto num_float_significand_bits =
detail::num_significand_bits<Float>();
constexpr auto implicit_bit = carrier_uint(1) << num_float_significand_bits;
constexpr auto significand_mask = implicit_bit - 1;
const auto implicit_bit = carrier_uint(1) << num_float_significand_bits;
const auto significand_mask = implicit_bit - 1;
auto u = bit_cast<carrier_uint>(n);
f = static_cast<F>(u & significand_mask);
auto biased_e = static_cast<int>((u & exponent_mask<Float>()) >>
Expand Down

0 comments on commit 17dda58

Please sign in to comment.