mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-21 00:59:36 +08:00
Eliminate warning about writing bytes directly to non-trivial type.
This commit is contained in:
parent
06b45905e7
commit
6ea33f95df
@ -660,7 +660,7 @@ void packetmath() {
|
||||
uint8_t v =
|
||||
internal::random<bool>() ? (std::is_same<Scalar, bool>::value ? static_cast<uint8_t>(true) : 0xff) : 0;
|
||||
// Avoid strict aliasing violation by using memset.
|
||||
memset(data1 + i, v, sizeof(Scalar));
|
||||
memset(static_cast<void*>(data1 + i), v, sizeof(Scalar));
|
||||
// "then" packet
|
||||
data1[i + PacketSize] = internal::random<Scalar>();
|
||||
// "else" packet
|
||||
|
Loading…
x
Reference in New Issue
Block a user