From 873670ba3f9e7bc77ec2c1c94b04f1f8bef77e9f Mon Sep 17 00:00:00 2001 From: Sascha Hestermann Date: Tue, 10 Dec 2024 14:35:32 +0100 Subject: [PATCH] Make parameter basic_memory_buffer& buf of to_string const --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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());