format_arg(float) now works with the desired precision

This commit is contained in:
2021-11-21 19:42:56 +01:00
parent ce2006694e
commit f2de0773ed
3 changed files with 63 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ public:
int main() {
constexpr auto formatted = format<"Test: {:3.8f} {:5.5} {:05.2}">(3.4, "abc", 1234);
const auto formatted = format<"Test: {:8.3} {:6.3} {:05.2}">(1432.4334, "abc", 1234);
for (const auto& c : formatted)
std::cout << c;