Template Library update

I've been playing around with an update to the template library for some time, replacing my mildly leaking tree implementation with a red black tree implementation from the OpenBSD project. It's faster and requires less code than my implementation. I think we can also safely assume that it was written by somebody who is smarter than me. I always like to use code from smart people whenever I can.

This isn't an official release, but will probably find its way into the 2.0 release that I've been contemplating. The source for the library is below. There's no makefile and no included test suite. It's not even beta code, so you're on your own if it breaks.

Features for 2.0

  • Improved, non-leaking tree implementation that compiles without warnings.
  • Direct handling of numeric output
  • Formatted output for things like floating point numbers
  • Formatted output for date/time objects

AttachmentSize
template.zip8.94 KB

Sounds excellent!

I've been wandering the web looking for a nice lightweight solution, with the view of replacing the current HTMl rendering code within the nagios project. Little concerned to read about the memory issues in the old, and would more than welcome an update to your project :)