diff --git a/include/fmt/format.h b/include/fmt/format.h index 7d1477e7f10c..9ee6d683e58c 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -891,7 +891,7 @@ class basic_memory_buffer : public detail::buffer { using memory_buffer = basic_memory_buffer; template -FMT_NODISCARD auto to_string(basic_memory_buffer& buf) +FMT_NODISCARD auto to_string(const basic_memory_buffer& buf) -> std::string { auto size = buf.size(); detail::assume(size < std::string().max_size());