diff options
author | Hauke Heibel <hauke.heibel@gmail.com> | 2009-08-31 14:40:53 +0200 |
---|---|---|
committer | Hauke Heibel <hauke.heibel@gmail.com> | 2009-08-31 14:40:53 +0200 |
commit | 32a9aee2861bbdeabc2c12d03d7a3337d4e691cd (patch) | |
tree | f40d68bf13aa5f5a8c2466dec327dfcbd4773784 /Eigen | |
parent | 99bfab6dcfec005bc2bc9291716fb3a7c5e7c21d (diff) |
Added MSVC guards to assignment operators.
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/MapBase.h | 7 | ||||
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/Eigen/src/Core/MapBase.h b/Eigen/src/Core/MapBase.h index a8fded4a0..a0311ffcf 100644 --- a/Eigen/src/Core/MapBase.h +++ b/Eigen/src/Core/MapBase.h @@ -166,6 +166,13 @@ template<typename Derived> class MapBase && cols >= 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols))); } +#ifndef _MSC_VER + Derived& operator=(const MapBase& other)
+ {
+ return Base::operator=(other);
+ } +#endif + using Base::operator=; using Base::operator*=; diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 7fb10a315..4e00df759 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -246,12 +246,25 @@ using Eigen::ei_cos; // needed to define it here as escaping characters in CMake add_definition's argument seems very problematic. #define EIGEN_DOCS_IO_FORMAT IOFormat(3, 0, " ", "\n", "", "") +#ifdef _MSC_VER #define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) \ using Base::operator =; \ using Base::operator +=; \ using Base::operator -=; \ using Base::operator *=; \ using Base::operator /=; +#else +#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) \ +using Base::operator =; \ +using Base::operator +=; \ +using Base::operator -=; \ +using Base::operator *=; \ +using Base::operator /=; \ +EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) \
+{ \
+ return Base::operator=(other); \
+}
+#endif
#define _EIGEN_GENERIC_PUBLIC_INTERFACE(Derived, BaseClass) \ typedef BaseClass Base; \ |