特に強い理由がなければ variadic template を使った方が安全だし簡単に書ける。

template<class... T>
void test6(std::string str, T... args) {
char buf[1024];
std::sprintf(buf, str.c_str(), args...);
std::printf(buf);
}