Make append work with fixed-size buffer

This commit is contained in:
Victor Zverovich
2020-07-11 06:53:25 -07:00
parent e8ec09ae83
commit d870468159
3 changed files with 35 additions and 16 deletions

View File

@@ -1811,9 +1811,9 @@ OutputIt vformat_to(
basic_format_args<buffer_context<type_identity_t<Char>>> args) {
auto& c = detail::get_container(out);
using container = remove_reference_t<decltype(c)>;
typename std::conditional<
std::is_same<container, detail::buffer<Char>>::value,
detail::buffer<Char>&, detail::container_buffer<container>>::type buf(c);
conditional_t<std::is_same<container, detail::buffer<Char>>::value,
detail::buffer<Char>&, detail::container_buffer<container>>
buf(c);
detail::vformat_to(buf, to_string_view(format_str), args);
return out;
}