bug #921: fix utilization of bitwise operation on enums in first_aligned

This commit is contained in:
Gael Guennebaud 2014-12-19 14:41:59 +01:00
parent 25c7d9164f
commit f5f6e2c6f4

View File

@ -523,9 +523,8 @@ template<typename T, bool Align> inline void conditional_aligned_delete_auto(T *
template<typename Scalar, typename Index> template<typename Scalar, typename Index>
inline Index first_aligned(const Scalar* array, Index size) inline Index first_aligned(const Scalar* array, Index size)
{ {
enum { PacketSize = packet_traits<Scalar>::size, static const Index PacketSize = packet_traits<Scalar>::size;
PacketAlignedMask = PacketSize-1 static const Index PacketAlignedMask = PacketSize-1;
};
if(PacketSize==1) if(PacketSize==1)
{ {