Skip to content

Commit

Permalink
Make parameter basic_memory_buffer<char, SIZE>& buf of to_string cons…
Browse files Browse the repository at this point in the history
…t again.
  • Loading branch information
sascha-devel committed Dec 10, 2024
1 parent 1413801 commit b082ea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ class basic_memory_buffer : public detail::buffer<T> {
using memory_buffer = basic_memory_buffer<char>;

template <size_t SIZE>
FMT_NODISCARD auto to_string(basic_memory_buffer<char, SIZE>& buf)
FMT_NODISCARD auto to_string(const basic_memory_buffer<char, SIZE>& buf)
-> std::string {
auto size = buf.size();
detail::assume(size < std::string().max_size());
Expand Down

0 comments on commit b082ea7

Please sign in to comment.