diff --git a/include/flatbuffers/flexbuffers.h b/include/flatbuffers/flexbuffers.h index 51cae532d..7cba5b75b 100644 --- a/include/flatbuffers/flexbuffers.h +++ b/include/flatbuffers/flexbuffers.h @@ -153,7 +153,7 @@ inline uint64_t ReadUInt64(const uint8_t *data, uint8_t byte_width) { // constant, which here it isn't. Test if memcpy is still faster than // the conditionals in ReadSizedScalar. Can also use inline asm. // clang-format off - #ifdef _MSC_VER + #if defined(_MSC_VER) && (defined(_M_X64) || defined _M_IX86) uint64_t u = 0; __movsb(reinterpret_cast(&u), reinterpret_cast(data), byte_width);