Added MSVC guards to assignment operators.

This commit is contained in:
Hauke Heibel 2009-08-31 14:40:53 +02:00
parent 99bfab6dcf
commit 32a9aee286
2 changed files with 20 additions and 0 deletions

View File

@ -166,6 +166,13 @@ template<typename Derived> class MapBase
&& cols >= 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols))); && 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=;
using Base::operator*=; using Base::operator*=;

View File

@ -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. // 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", "", "") #define EIGEN_DOCS_IO_FORMAT IOFormat(3, 0, " ", "\n", "", "")
#ifdef _MSC_VER
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) \ #define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
using Base::operator =; \ using Base::operator =; \
using Base::operator +=; \ using Base::operator +=; \
using Base::operator -=; \ 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) \ #define _EIGEN_GENERIC_PUBLIC_INTERFACE(Derived, BaseClass) \
typedef BaseClass Base; \ typedef BaseClass Base; \