We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12d9498 commit 680f5bfCopy full SHA for 680f5bf
include/Utils.hpp
@@ -276,7 +276,12 @@ inline std::vector<T> get_triangle_strip_outline_indices(const std::size_t num_v
276
return out_indices;
277
}
278
279
-template<class... Args>
+inline std::string string_format(const char* fmt)
280
+{
281
+ return fmt ? std::string(fmt) : std::string();
282
+}
283
+
284
+template<class... Args, typename std::enable_if<(sizeof...(Args) > 0), int>::type = 0>
285
std::string string_format(const char* fmt, Args&&... args)
286
{
287
const int n = std::snprintf(nullptr, 0, fmt, std::forward<Args>(args)...);
0 commit comments