swestrup: (Default)
[personal profile] swestrup
Having been forcefully reminded how sucky C++'s output formatting operators are to use, I started planning to write something better.

My preliminary design had one able to write something like this:

Fmt hexb("%02X");
cout << hexb % 0x12 << endl;
That seemed logical enough. While I was looking into what I would need to do to write it, I discovered it already exists. Its the format boost library. They even use operator% in the same way. The only major differences are:
  1. Mine is in the design stage. Theirs exists.
  2. They have a whole lot more options than I had thought of.
  3. They called it format, while I called my Fmt.
Once again, I'm behind on the old innovation curve.
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

January 2017

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 3rd, 2025 11:05 am
Powered by Dreamwidth Studios