提交 7b96bbfa 编写于 作者: M minqiyang

Add template specialization

上级 e053e745
...@@ -90,8 +90,8 @@ std::string Sprintf(const Args&... args) { ...@@ -90,8 +90,8 @@ std::string Sprintf(const Args&... args) {
return oss.str(); return oss.str();
} }
template <typename... Args> template <const char* fmt, typename... Args>
std::string Sprintf(const char* fmt, const Args&... args) { std::string Sprintf(const Args&... args) {
std::ostringstream oss; std::ostringstream oss;
Fprintf(oss, fmt, args...); Fprintf(oss, fmt, args...);
return oss.str(); return oss.str();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册