Skip to content

Commit

Permalink
Make parameter basic_memory_buffer<char, SIZE>& buf of to_string const
Browse files Browse the repository at this point in the history
  • Loading branch information
sascha-devel authored and vitaut committed Dec 11, 2024
1 parent 735d4cc commit 873670b
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 873670b

Please sign in to comment.