-
Notifications
You must be signed in to change notification settings - Fork 7
Description
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.