Shamelessly copied fmtlib code for decimal formatting; Added comment with idea about error handling

This commit is contained in:
2021-11-26 01:02:10 +01:00
parent afa7831e93
commit c0d0bb5bad
4 changed files with 120 additions and 24 deletions

View File

@@ -1,14 +1,14 @@
#include <iostream>
//#include <iostream>
#include <Logger.h>
int main() {
constexpr auto formatted = "Test: {:012.5} {:6} {:8}"_fmt(142.4334, "abcdef", -1234);
int main(int argc, char* argv[]) {
auto formatted = "Test: {:12} {:012.5} {:8}"_fmt(argv[0], argc, -1234);
for (const auto& c : formatted)
std::cout << c;
std::cout << std::endl;
return 0;
return formatted[6];
}