D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21847 - std.format: %e, %g and %a should be supported for integers too
Summary: std.format: %e, %g and %a should be supported for integers too
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 enhancement
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2021-04-21 17:41 UTC by Berni44
Modified: 2021-05-07 06:59 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Berni44 2021-04-21 17:41:56 UTC
This is inspired by issue 16078. I see no reason, why integers shouldn't be formatted with these three specifiers. I would probably also add %f for completeness reasons, although it's probably less useful.
Comment 1 Dlang Bot 2021-04-26 15:31:32 UTC
@berni44 created dlang/phobos pull request #8015 "std.format: Add formatting integers with %e, %f, %g and %a." fixing this issue:

- Fix Issue 21847 - std.format: %e, %g and %a should be supported for integers too

https://github.com/dlang/phobos/pull/8015
Comment 2 Dlang Bot 2021-05-07 06:59:31 UTC
dlang/phobos pull request #8015 "std.format: Add formatting integers with %e, %f, %g and %a." was merged into master:

- 5fbc1da0fa105e843c25c28e37c6dfa32250f97e by berni44:
  Fix Issue 21847 - std.format: %e, %g and %a should be supported for integers too

https://github.com/dlang/phobos/pull/8015