template<typename ... Args>
// 0個以上のテンプレートパラメータを受け取る
template <typename ... Args>
class hoge_t {
public:
hoge_t();
void set(Args ... args);
};
// 0個以上の任意の型のパラメータを受け取る
template <typename ... Args>
void f(Args ... args);template <typename ... Args>
std::string format( const std::string& fmt, Args ... args )
{
size_t len = std::snprintf( nullptr, 0, fmt.c_str(), args ... );
std::vector<char> buff( len + 1 );
std::snprintf( &buff[0], len + 1, fmt.c_str(), args ... );
return std::string( &buff[0], &buff[0] + len );
}