Skip to content

Commit

Permalink
Fixing "C4127: conditional expression is constant" Visual Studio 2022…
Browse files Browse the repository at this point in the history
… warning in pedantic mode (#2783)
chronoxor authored Feb 21, 2022
1 parent 4fcacea commit 1a18a2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/format.h
Original file line number Diff line number Diff line change
@@ -2260,7 +2260,7 @@ FMT_CONSTEXPR20 auto write(OutputIt out, T value,
precision = 1;
}
if (const_check(std::is_same<T, float>())) fspecs.binary32 = true;
if (!std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::digits > 64)
if (const_check(!std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::digits > 64))
fspecs.fallback = true;
int exp = format_float(convert_float(value), precision, fspecs, buffer);
fspecs.precision = precision;

0 comments on commit 1a18a2f

Please sign in to comment.