mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-06 14:14:46 +08:00
Use data.data() instead of &data (since it is not obvious that Array is trivially copyable)
This commit is contained in:
parent
e6fcee995b
commit
8333e03590
@ -44,7 +44,7 @@ T apply_bit_op(Bits a, Bits b, Func f) {
|
||||
for(Index i = 0; i < data.size(); ++i)
|
||||
data[i] = f(a[i], b[i]);
|
||||
// Note: The reinterpret_cast works around GCC's class-memaccess warnings:
|
||||
std::memcpy(reinterpret_cast<unsigned char*>(&res), &data, sizeof(T));
|
||||
std::memcpy(reinterpret_cast<unsigned char*>(&res), data.data(), sizeof(T));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user