https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120548
Bug ID: 120548 Summary: std::format confuses a negative sign for a thousands digit when formatting floating point numbers Product: gcc Version: 15.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: drew.dormann at gmail dot com Target Milestone: --- A minimal reproducible example. ``` #include <format> #include <iostream> int main() { std::cout << std::format( std::locale("en_US.UTF-8"), "{:L}", -123.45 ); } ``` I expect this code to display `-123.45`. I'm asking for thousands separators, but there is no thousands digit. Instead, I see: -,123.45 This differs from the behavior of MSVC, clang's libc++, and fmt::format, which all produce the result I expected.