43 fmt::format_string<Args...> format, Args&&... args) -> std::string {
44 const int current_errno = errno;
45 fmt::memory_buffer buffer;
47 std::back_inserter(buffer), format, std::forward<Args>(args)...);
48 if (current_errno != 0) {
49 const auto error_code =
50 std::error_code(current_errno, std::generic_category());
52 std::back_inserter(buffer),
": {}", error_code.message());
54 return std::string(buffer.data(), buffer.size());