MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / string_with_format

Function string_with_format

arm_compute/core/utils/logging/Helpers.h:53–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 */
52template <typename... Ts>
53inline std::string string_with_format(const std::string &fmt, Ts &&...args)
54{
55 size_t size = support::cpp11::snprintf(nullptr, 0, fmt.c_str(), args...) + 1;
56 auto char_str = std::make_unique<char[]>(size);
57 support::cpp11::snprintf(char_str.get(), size, fmt.c_str(), args...);
58 return std::string(char_str.get(), char_str.get() + size - 1);
59}
60/** Wraps a value with angles and returns the string
61 *
62 * @param[in] val Value to wrap

Callers 1

logMethod · 0.85

Calls 2

snprintfFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected