Skip to content

Commit 91c5602

Browse files
committed
Add template specialization back
1 parent 7a75cef commit 91c5602

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

paddle/fluid/string/printf.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ void Fprintf(std::ostream& out, const char* fmt, const Args&... args) {
8383
tinyformat::vformat(out, fmt, tinyformat::makeFormatList(args...));
8484
}
8585

86+
template <typename... Args>
87+
std::string Sprintf(const Args&... args) {
88+
std::ostringstream oss;
89+
Fprintf(oss, "");
90+
return oss.str();
91+
}
92+
8693
template <typename... Args>
8794
std::string Sprintf(const char* fmt, const Args&... args) {
8895
std::ostringstream oss;

0 commit comments

Comments
 (0)