swestrup: (Default)
swestrup ([personal profile] swestrup) wrote2007-03-10 08:06 pm

Too Slow...

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.

Post a comment in response:

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