Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
See the readme for fmt: https://github.com/fmtlib/fmt . The resulting binary size is actually closer to printf than it is to iostreams.
Good news, they're adding that retroactively to C++20.
However, not all is lost. While there are libraries like {fmt} I don't pay attention to them because they are far away into The Future and unusable with my requirements (C++03 support at the earliest, work reasons). Most newfangled libs I've seen are intended for Compilers of the Future, for C++20/C++23 and the like, and with that among other reasons are not generic enough for me. Instead I just use tinyformat that lays on top of both and bridges them, not to mention the biggest sell that is rrtaining the POSIX style printf notation (why didn't {fmt} go with that is still a mystery to me).
I looked it up and printf() being Turing complete is to be taken with a grain of salt, but much more can be done with printf() than I would have ever thought. A paper outlining the dangers of printf() was followed by a game of Tic Tac Toe entirely run from a printf() (minus some #defines). http://nebelwelt.net/publications/files/15SEC.pdf https://github.com/carlini/printf-tac-toe