| 2049 | // Formats a value. |
| 2050 | template <typename Char, typename T> |
| 2051 | void format(BasicFormatter<Char> &f, const Char *&format_str, const T &value) { |
| 2052 | std::basic_ostringstream<Char> os; |
| 2053 | os << value; |
| 2054 | internal::Arg arg; |
| 2055 | internal::Value &arg_value = arg; |
| 2056 | std::basic_string<Char> str = os.str(); |
| 2057 | arg_value = internal::MakeValue<Char>(str); |
| 2058 | arg.type = internal::Arg::STRING; |
| 2059 | format_str = f.format(format_str, arg); |
| 2060 | } |
| 2061 | |
| 2062 | // Reports a system error without throwing an exception. |
| 2063 | // Can be used to report errors from destructors. |
no test coverage detected