
8 Sep
2013
8 Sep
'13
11:16 p.m.
On 7/09/2013 08:11, Quoth Alexey Klimkin:
I found this boost::format wrapper to be very convenient as replacement of sprintf. Can something like that be a part of the library? [...] template
format& my_format(format& fmter, T value, Args... args) { fmter % value; return my_format(fmter, args...); }
While that's definitely convenient (if you have C++11 variadic templates, anyway), I suspect that sort of construct would create quite a bit of code bloat. (Permutational expansion depending on number and type of parameters.) The compiler *might* be smart enough to save you from most of it via inlining, but I'm not sure how far I'd trust that.