back
3 comments
Hardcode it in the compiler already. GCC has had it since 1992, Norcroft C even earlier if I remember correctly.
> The only reason printf needed to embed that extra type information was because the C programming language lacked variadic templates.

And to specify the format. If you want this function to print your integer as hexadecimal, for example, I guess you have to format it first.

I use boost::format when I want a type safe printf-like in C++.