| 90 | |
| 91 | template <typename Char, typename T> |
| 92 | void format_value(buffer<Char>& buf, const T& value, |
| 93 | locale_ref loc = locale_ref()) { |
| 94 | formatbuf<Char> format_buf(buf); |
| 95 | std::basic_ostream<Char> output(&format_buf); |
| 96 | #if !defined(FMT_STATIC_THOUSANDS_SEPARATOR) |
| 97 | if (loc) output.imbue(loc.get<std::locale>()); |
| 98 | #endif |
| 99 | output.exceptions(std::ios_base::failbit | std::ios_base::badbit); |
| 100 | output << value; |
| 101 | buf.resize(buf.size()); |
| 102 | } |
| 103 | |
| 104 | // Formats an object of type T that has an overloaded ostream operator<<. |
| 105 | template <typename T, typename Char> |
no test coverage detected