#include "boost/format.hpp" #include template void string_format(boost::format& fmt, TFirst&& first) { fmt% first; } template void string_format(boost::format& fmt, TFirst&& first, TOther&&... other) { fmt% first; string_format(fmt, other...); } template std::string string_format(const char* format, TFirst&& first, TOther&&... other) { boost::format fmt(format); string_format(fmt, first, other...); return fmt.str(); }