Currently TC log functions work with (unsafe) va_list format arguments.
Since C++11 its possible to add variadic template arguments so its possible to implement type safe printf functions now that are even faster then cstdio’s [COLOR=rgb(153,0,0)]sprintf because of perfect forwarding (r-value references) and metaprogramming.
The main benefit is that it will warn about wrong formatters (“%s” instead of “%d” for example).
You can find some background information and implementations here:
Not backward compatible to sprintf:
There is also a boost implementation of format but didn’t take a look at it yet.
Backward compatible to sprintf:
I’m sure that it will take less effort to replace va_args &sprintf by a backward compatible typesafe version of format.
What do you think about it?