From a6eb4a511c61a29018c6d28ec807e182a752ec4a Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 25 Jan 2026 17:38:54 -0800 Subject: [PATCH] Use memcpy consistently --- include/fmt/format.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index a5be74d2..d99ac594 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -48,11 +48,11 @@ #ifndef FMT_MODULE # include // malloc, free +# include // memcpy # include // std::signbit # include // std::byte # include // uint32_t -# include // std::memcpy # include // std::numeric_limits # include // std::bad_alloc # if defined(__GLIBCXX__) && !defined(_GLIBCXX_USE_DUAL_ABI) @@ -283,7 +283,7 @@ FMT_CONSTEXPR20 auto bit_cast(const From& from) -> To { #endif auto to = To(); // The cast suppresses a bogus -Wclass-memaccess on GCC. - std::memcpy(static_cast(&to), &from, sizeof(to)); + memcpy(static_cast(&to), &from, sizeof(to)); return to; }