[libcxx-commits] [PATCH] D70631: Microsoft's floating-point to_chars powered by Ryu and Ryu Printf

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 22 14:36:02 PST 2022


Quuxplusone added a comment.

In D70631#3338720 <https://reviews.llvm.org/D70631#3338720>, @STL_MSFT wrote:

> In D70631#3337734 <https://reviews.llvm.org/D70631#3337734>, @bcain wrote:
>
>> I can post a patch to change the test to use the `inttypes.h` `PRI___` specifiers instead.
>
> I think that'd be the least invasive fix, yeah.

FWIW, I would vastly rather see `printf("%zu whatever", size_t(x))` instead of `printf("%" PRIu32 " whatever", x)`. Keeps the message's string literal all in one piece, doesn't suffer UDL-related lexer issues, and doesn't require intimate knowledge of <stdint.h> or whatever.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70631/new/

https://reviews.llvm.org/D70631



More information about the libcxx-commits mailing list