mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 09:28:21 +00:00
Don't use deprecated API in docs
This commit is contained in:
parent
8465869d7b
commit
e41ac1f875
@ -350,8 +350,8 @@ allocator::
|
||||
|
||||
custom_string vformat(custom_allocator alloc, fmt::string_view format_str,
|
||||
fmt::format_args args) {
|
||||
custom_memory_buffer buf(alloc);
|
||||
fmt::vformat_to(buf, format_str, args);
|
||||
auto buf = custom_memory_buffer(alloc);
|
||||
fmt::vformat_to(std::back_inserter(buf), format_str, args);
|
||||
return custom_string(buf.data(), buf.size(), alloc);
|
||||
}
|
||||
|
||||
|
@ -607,8 +607,8 @@ enum { inline_buffer_size = 500 };
|
||||
|
||||
**Example**::
|
||||
|
||||
fmt::memory_buffer out;
|
||||
format_to(out, "The answer is {}.", 42);
|
||||
auto out = fmt::memory_buffer();
|
||||
format_to(std::back_inserter(out), "The answer is {}.", 42);
|
||||
|
||||
This will append the following output to the ``out`` object:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user