Skip to content

Review 2: formatting docs #1214

@jzmaddock

Description

@jzmaddock

From the review:

It is not clean from the wording whether {fmt} is supported conditionally, or
always: "Boost.Decimal allows you to format your output with both <format>
and <fmt/format.h> depending on your compiler support." This sounds like the
support for <fmt/format.h> is also conditional. I recommend saying something
like: "Boost.Decimal allows you to format your output with <fmt/format.h>
and also with the standard <format> if your compiler supports it."

Please use user defined literals in the format examples for the constants, it
takes time to realize that { 314, -2 } is actually +3.14 while a decimal
notation UDL would make it immediately obvious.

There isn't much sense in using std::endl, the buffers are flushed at the end
of the program. And in practice the buffers are flushed at the end of every
line. And in addition to that std::flush does not really guarantee flushing
all the way to the final destination. Dietmar Kuhl has a very nice
presentation about this.

I'd remove return 0;. That is the default return value of main and those
lines do not add any value to the example.

What are we demonstrating in this example? If we are demonstrating the
printing then we should have the program output with the examples.

Metadata

Metadata

Assignees

Labels

Boost ReviewCollected Comments from Boost Review PerioddocumentationImprovements or additions to documentation

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions