Skip to content

Commit

Permalink
Fix conversion issue with float_round_style
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinzii committed Apr 6, 2024
1 parent 0ab013a commit 8e41d26
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions include/ccmath/internal/support/limits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace ccm::support
{
enum float_round_style : std::int8_t
enum class float_round_style : std::int8_t
{
round_indeterminate = -1,
round_toward_zero = 0,
Expand Down Expand Up @@ -66,17 +66,6 @@ namespace ccm::support

static constexpr const bool traps = std::numeric_limits<type>::traps;
static constexpr const bool tinyness_before = std::numeric_limits<type>::tinyness_before;
static constexpr const float_round_style round_style = std::numeric_limits<type>::round_style;
static constexpr const float_round_style round_style = static_cast<float_round_style>(std::numeric_limits<type>::round_style);
};


template <class T, int digits, bool IsSigned>
struct compute_min {
static constexpr const T value = T(T(1) << digits);
};

template <class T, int digits>
struct compute_min<T, digits, false> {
static constexpr const T value = T(0);
};
}
} // namespace ccm::support

0 comments on commit 8e41d26

Please sign in to comment.