mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-27 12:49:46 +01:00
Increment output iterator in basic_writer::write for character types (#1056)
This commit is contained in:
committed by
Victor Zverovich
parent
a97757736b
commit
287eaab3b2
@@ -2755,10 +2755,14 @@ template <typename Range> class basic_writer {
|
||||
void write(long double value) { write_double(value, format_specs()); }
|
||||
|
||||
/** Writes a character to the buffer. */
|
||||
void write(char value) { *reserve(1) = value; }
|
||||
void write(char value) {
|
||||
auto&& it = reserve(1);
|
||||
*it++ = value;
|
||||
}
|
||||
void write(wchar_t value) {
|
||||
static_assert(std::is_same<char_type, wchar_t>::value, "");
|
||||
*reserve(1) = value;
|
||||
auto&& it = reserve(1);
|
||||
*it++ = value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user