mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-29 10:17:40 +02:00
Make parameter basic_memory_buffer<char, SIZE>& buf of to_string const
This commit is contained in:
committed by
Victor Zverovich
parent
735d4cc05e
commit
873670ba3f
@ -891,7 +891,7 @@ class basic_memory_buffer : public detail::buffer<T> {
|
|||||||
using memory_buffer = basic_memory_buffer<char>;
|
using memory_buffer = basic_memory_buffer<char>;
|
||||||
|
|
||||||
template <size_t SIZE>
|
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 {
|
-> std::string {
|
||||||
auto size = buf.size();
|
auto size = buf.size();
|
||||||
detail::assume(size < std::string().max_size());
|
detail::assume(size < std::string().max_size());
|
||||||
|
Reference in New Issue
Block a user