[libcxx-commits] [libcxx] [libcxx] coerce formatter literal to int32_t (PR #87738)
Brian Cain via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 5 05:22:16 PDT 2024
================
@@ -690,7 +690,7 @@ __format_floating_point(_Tp __value, _FormatContext& __ctx, __format_spec::__par
// Let P equal the precision if nonzero, 6 if the precision is not
// specified, or 1 if the precision is 0. Then, if a conversion with
// style E would have an exponent of X:
- int __p = std::max(1, (__specs.__has_precision() ? __specs.__precision_ : 6));
+ int __p = std::max(int32_t(1), (__specs.__has_precision() ? __specs.__precision_ : 6));
----------------
androm3da wrote:
> Can you verify this works for you?
It does, thanks! Updated per suggestion.
https://github.com/llvm/llvm-project/pull/87738
More information about the libcxx-commits
mailing list