Add an overload of write for buffer_appender
This commit is contained in:
parent
d870468159
commit
e4f57bfd7f
@ -1760,6 +1760,13 @@ OutputIt write(OutputIt out, basic_string_view<Char> value) {
|
||||
return base_iterator(out, it);
|
||||
}
|
||||
|
||||
template <typename Char>
|
||||
buffer_appender<Char> write(buffer_appender<Char> out,
|
||||
basic_string_view<Char> value) {
|
||||
get_container(out).append(value.begin(), value.end());
|
||||
return out;
|
||||
}
|
||||
|
||||
template <typename Char, typename OutputIt, typename T,
|
||||
FMT_ENABLE_IF(is_integral<T>::value &&
|
||||
!std::is_same<T, bool>::value &&
|
||||
|
@ -81,9 +81,9 @@ TEST(UtilTest, FormatWindowsError) {
|
||||
EXPECT_EQ(fmt::format("test: {}", utf8_message.str()),
|
||||
fmt::to_string(actual_message));
|
||||
actual_message.resize(0);
|
||||
auto max_size = fmt::detail::max_value<size_t>();
|
||||
auto max_size = fmt::detail::max_value<long long>();
|
||||
fmt::detail::format_windows_error(actual_message, ERROR_FILE_EXISTS,
|
||||
fmt::string_view(0, max_size));
|
||||
fmt::string_view(nullptr, max_size));
|
||||
EXPECT_EQ(fmt::format("error {}", ERROR_FILE_EXISTS),
|
||||
fmt::to_string(actual_message));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user