mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-21 18:20:04 +00:00
Add support for code units > 0xFFFF in fill
This commit is contained in:
parent
601be1cbe7
commit
a16ff5787b
@ -677,7 +677,8 @@ FMT_CONSTEXPR void for_each_codepoint(string_view s, F f) {
|
||||
auto num_chars_left = to_unsigned(s.data() + s.size() - p);
|
||||
if (num_chars_left == 0) return;
|
||||
|
||||
FMT_ASSERT(num_chars_left < block_size, "");
|
||||
// Suppress bogus -Wstringop-overflow.
|
||||
if (FMT_GCC_VERSION) num_chars_left &= 3;
|
||||
char buf[2 * block_size - 1] = {};
|
||||
copy<char>(p, p + num_chars_left, buf);
|
||||
const char* buf_ptr = buf;
|
||||
|
Loading…
Reference in New Issue
Block a user