19 if constexpr (std::is_same<std::remove_cv_t<std::remove_reference_t<T>>, std::string>::value)
21 return std::forward<T>(t).c_str();
25 return std::forward<T>(t);
29 template<
typename... Args>
32 const auto size = std::snprintf(
nullptr, 0, format.c_str(), std::forward<Args>(args)...) + 1;
33 const auto buffer = std::make_unique<char[]>(size);
35 std::snprintf(buffer.get(), size, format.c_str(), std::forward<Args>(args)...);
37 return std::string(buffer.get(), buffer.get() + size - 1);
40 template<
typename... Args>