mirror of
https://github.com/fmtlib/fmt.git
synced 2026-02-16 23:29:57 +08:00
Fix usage of memset
This commit is contained in:
parent
a6eb4a511c
commit
25df8ccd96
@ -564,7 +564,7 @@ FMT_CONSTEXPR20 auto fill_n(T* out, Size count, char value) -> T* {
|
|||||||
if (is_constant_evaluated()) return fill_n<T*, Size, T>(out, count, value);
|
if (is_constant_evaluated()) return fill_n<T*, Size, T>(out, count, value);
|
||||||
static_assert(sizeof(T) == 1,
|
static_assert(sizeof(T) == 1,
|
||||||
"sizeof(T) must be 1 to use char for initialization");
|
"sizeof(T) must be 1 to use char for initialization");
|
||||||
std::memset(out, value, to_unsigned(count));
|
memset(out, value, to_unsigned(count));
|
||||||
return out + count;
|
return out + count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user