summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorMarkus Mittendrein <maxmitti@maxmitti.tk>2022-01-08 02:42:12 +0100
committerMarkus Mittendrein <maxmitti@maxmitti.tk>2022-01-08 02:42:12 +0100
commit38b6eae61d15ec410d3a32f1422c1e88848e5e2b (patch)
tree7e2330eea7d94daaf952ff81514fdcc4348c1b81 /main.cpp
parentab2c61054f09e0834cba6008263096f2afdfd4d0 (diff)
downloadcxxformat-38b6eae61d15ec410d3a32f1422c1e88848e5e2b.tar.gz
cxxformat-38b6eae61d15ec410d3a32f1422c1e88848e5e2b.zip
Add bool formatter
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index a86e1e8..bb041f6 100644
--- a/main.cpp
+++ b/main.cpp
@@ -33,6 +33,7 @@ int main(int argc, char* argv[])
format_to("Hallo %%du %1$s %s%c %s %u = %4$#x = %4$#X = %4$#o %f!\n", std::cout, "Knirp", 's', argv[0], 42u, 1.337);
assert(format("Hallo %%du %1$s %s%c %s %u = %4$#x = %4$#X = %4$#o %f!\n", "Knirp", 's', argv[0], 42u, 1.337) == "Hallo %%du %1$s %s%c %s %u = %4$#x = %4$#X = %4$#o %f!\n"_format("Knirp", 's', argv[0], 42u, 1.337));
+ "-%5s-%5s-%u-%u-\n"_format_to(stdout, true, false, true, false);
"-%20g-\n"_format_to(stdout, 0x1.8p0);
"-%20.0a-\n"_format_to(stdout, 0.0);
"-%#+20.0a-\n"_format_to(stdout, 1.0);