Skip to content

Standard form of float always includes the ".0" #1943

@madscientist

Description

@madscientist

I'm using fmt 7.0.3 (on GNU/Linux with GCC 10.2).

When I format a simple fmt::format("double {}", (double)90) the result is double 90.0. Based on my reading of the spec (and what used to be generated by fmt 5.3.0, which I was using previously) this is incorrect and the output should be just double 90 (no decimal), because I didn't include the # to select the alternative form.

Am I misunderstanding something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions