| 2506 | |
| 2507 | template <typename T, FMT_ENABLE_IF(std::is_floating_point<T>::value&& has_isfinite<T>::value)> |
| 2508 | FMT_CONSTEXPR20 bool isfinite(T value) { |
| 2509 | constexpr T inf = T(std::numeric_limits<double>::infinity()); |
| 2510 | if (is_constant_evaluated()) return !detail::isnan(value) && value < inf && value > -inf; |
| 2511 | return std::isfinite(value); |
| 2512 | } |
| 2513 | |
| 2514 | template <typename T, FMT_ENABLE_IF(!has_isfinite<T>::value)> FMT_CONSTEXPR bool isfinite(T value) { |
| 2515 | T inf = T(std::numeric_limits<double>::infinity()); |
nothing calls this directly
no test coverage detected