Skip to content

Commit

Permalink
Use FMT_NOEXCEPT instead of noexcept directly
Browse files Browse the repository at this point in the history
Otherwise breaks on compilers without noexcept support
  • Loading branch information
tohammer authored and vitaut committed Jan 14, 2020
1 parent 65ac626 commit 77165fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -878,11 +878,11 @@ inline Char* format_decimal(Char* buffer, UInt value, int num_digits,
return end;
}

template <typename Int> constexpr int digits10() noexcept {
template <typename Int> constexpr int digits10() FMT_NOEXCEPT {
return std::numeric_limits<Int>::digits10;
}
template <> constexpr int digits10<int128_t>() noexcept { return 38; }
template <> constexpr int digits10<uint128_t>() noexcept { return 38; }
template <> constexpr int digits10<int128_t>() FMT_NOEXCEPT { return 38; }
template <> constexpr int digits10<uint128_t>() FMT_NOEXCEPT { return 38; }

template <typename Char, typename UInt, typename Iterator, typename F>
inline Iterator format_decimal(Iterator out, UInt value, int num_digits,
Expand Down

0 comments on commit 77165fd

Please sign in to comment.