diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index eb7f30ced..622c84a8e 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -28,7 +28,13 @@ // just a workaround because GCC seems to not really like empty structs #ifdef __GNUG__ - class ei_empty_struct{char _ei_dummy_;}; + struct ei_empty_struct + { + EIGEN_ALWAYS_INLINE_ATTRIB ei_empty_struct() {} + EIGEN_ALWAYS_INLINE_ATTRIB ei_empty_struct(const ei_empty_struct&) {} + EIGEN_ALWAYS_INLINE_ATTRIB ei_empty_struct& operator=(const ei_empty_struct&) { return *this; } + char _ei_dummy_; + }; #define EIGEN_EMPTY_STRUCT : Eigen::ei_empty_struct #else #define EIGEN_EMPTY_STRUCT