MCPcopy Create free account
hub / github.com/fmtlib/fmt / isfinite

Method isfinite

include/fmt/format.h:2652–2657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2650template <typename T,
2651 FMT_ENABLE_IF(is_floating_point<T>::value&& has_isfinite<T>::value)>
2652FMT_CONSTEXPR20 auto isfinite(T value) -> bool {
2653 constexpr T inf = T(std::numeric_limits<double>::infinity());
2654 if (is_constant_evaluated())
2655 return !detail::isnan(value) && value < inf && value > -inf;
2656 return std::isfinite(value);
2657}
2658template <typename T, FMT_ENABLE_IF(!has_isfinite<T>::value)>
2659FMT_CONSTEXPR auto isfinite(T value) -> bool {
2660 T inf = T(std::numeric_limits<double>::infinity());

Callers

nothing calls this directly

Calls 2

is_constant_evaluatedFunction · 0.85
isfiniteFunction · 0.85

Tested by

no test coverage detected