Skip to content

Commit

Permalink
keep documentation comment formatted properly
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldreik committed Jun 9, 2019
1 parent 87d2c99 commit dee6908
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions include/fmt/safe_duration_cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,20 @@ FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) {
return from;
} // function

// clang-format off
/**
* converts From to To if possible, otherwise ec is set.
*
* input | output
* ---------------------------------|---------------
* NaN | NaN
* Inf | Inf
* normal, fits in output | converted (possibly with loss of
* precision) normal, does not fit in output | ec is set subnormal | best
* effort -Inf | -Inf
* normal, fits in output | converted (possibly lossy)
* normal, does not fit in output | ec is set
* subnormal | best effort
* -Inf | -Inf
*/
// clang-format on
template <typename To, typename From,
FMT_ENABLE_IF(!std::is_same<From, To>::value)>
FMT_CONSTEXPR To safe_float_conversion(const From from, int& ec) {
Expand Down

0 comments on commit dee6908

Please sign in to comment.