much better workaround for empty struct (the previous one caused GCC 4.3 to generate wrong code leading to segfaults)

This commit is contained in:
Gael Guennebaud
2009-12-18 17:08:59 +01:00
parent 945cbc3bc6
commit 9d54783036
5 changed files with 53 additions and 34 deletions

View File

@@ -25,8 +25,8 @@
#ifndef EIGEN_RANDOM_H
#define EIGEN_RANDOM_H
template<typename Scalar> struct ei_scalar_random_op EIGEN_EMPTY_STRUCT {
inline ei_scalar_random_op(void) {}
template<typename Scalar> struct ei_scalar_random_op {
EIGEN_EMPTY_STRUCT_CTOR(ei_scalar_random_op)
inline const Scalar operator() (int, int) const { return ei_random<Scalar>(); }
};
template<typename Scalar>