Wow, this is exceptionally cool.  I'm highly tempted to pull this into every 
project I work on.  Do you consider it stable at this point?

I think I hadn't really seen variadic templates used before.  Do you think they 
are supported on all the compilers we care about?  With everything inlined, do 
you see a lot of code bloat if you riddle a big project with format calls?  Do 
you think there's any advantage to making the header small and having a single 
.cpp that holds the implementations of some of the bigger inline functions?

Kudos, this is great work!

        -- lg


On Jul 27, 2011, at 3:18 AM, Chris Foster wrote:

> Hi guys,
> 
> I've been working on a tiny string formatting library for the last couple of
> days - the idea is to have a typesafe drop-in replacement for C99 printf() and
> sprintf() .  The other idea is that the library should be light weight enough
> to distribute in a single header file so projects (like OIIO for example) can
> bundle it easily without worring about heavy dependencies.  I was frustrated
> that in 2011 we apparently still only have alternatives to printf which are
> some combination of
> 1) huge dependencies,
> 2) slow down the build by far to much (hello boost::format)
> 3) are hopelessly verbose (hello standard iostreams)
> 
> Some of you may remember a discussion a while back about
> OPENIMAGEIO_PRINTF_ARGS, and the type safety issues which it helps to 
> mitigate.
> There was also some discussion about the best way to print a size_t, with it
> being decided that a cast to long was the least ugly solution (IIRC).
> Tinyformat does away with these niggling issues by being properly typesafe,
> it's also able to format user-defined types.
> 
> Anyway, I thought I'd mention it here in case people were interested in using
> it.  The URL is https://github.com/c42f/tinyformat.
> 
> Cheers,
> ~Chris
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
[email protected]


_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to