[Bug libstdc++/110355] std::format("{}", 1e-7) returns "1e-07" instead of "1e-7"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110355 Jonathan Wakely changed: What|Removed |Added Resolution|--- |INVALID Status|ASSIGNED|RESOLVED --- Comment #3 from Jonathan Wakely --- Libstdc++ is correct, the example in https://wg21.link/p2587r3 is wrong.
[Bug libstdc++/110355] std::format("{}", 1e-7) returns "1e-07" instead of "1e-7"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110355 Jonathan Wakely changed: What|Removed |Added CC||ppalka at gcc dot gnu.org --- Comment #2 from Jonathan Wakely --- Oh this is actually std::to_chars not std::format #include int main() { char buf[5]; std::to_chars(buf, buf+5, 1e-7); if (__builtin_memcmp(buf, "1e-7", 4)) __builtin_abort(); }
[Bug libstdc++/110355] std::format("{}", 1e-7) returns "1e-07" instead of "1e-7"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110355 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2023-06-21 Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely --- mine