| 901 | |
| 902 | template <size_t SIZE> |
| 903 | FMT_NODISCARD auto to_string(const basic_memory_buffer<char, SIZE>& buf) |
| 904 | -> std::string { |
| 905 | auto size = buf.size(); |
| 906 | detail::assume(size < std::string().max_size()); |
| 907 | return {buf.data(), size}; |
| 908 | } |
| 909 | |
| 910 | // A writer to a buffered stream. It doesn't own the underlying stream. |
| 911 | class writer { |