mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-10 02:39:03 +08:00
* fix compilation with gcc-4.0 which doesn't like "using" too much
* add Eigen:: in some macros to allow using them from outside of namespace Eigen Problems and solutions communicated by Gael.
This commit is contained in:
parent
c9b0dcd733
commit
758b26551a
@ -85,18 +85,18 @@ using Eigen::MatrixBase;
|
|||||||
template<typename OtherDerived> \
|
template<typename OtherDerived> \
|
||||||
Derived& operator Op(const MatrixBase<OtherDerived>& other) \
|
Derived& operator Op(const MatrixBase<OtherDerived>& other) \
|
||||||
{ \
|
{ \
|
||||||
return MatrixBase<Derived>::operator Op(other); \
|
return Eigen::MatrixBase<Derived>::operator Op(other); \
|
||||||
} \
|
} \
|
||||||
Derived& operator Op(const Derived& other) \
|
Derived& operator Op(const Derived& other) \
|
||||||
{ \
|
{ \
|
||||||
return MatrixBase<Derived>::operator Op(other); \
|
return Eigen::MatrixBase<Derived>::operator Op(other); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \
|
#define EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \
|
||||||
template<typename Other> \
|
template<typename Other> \
|
||||||
Derived& operator Op(const Other& scalar) \
|
Derived& operator Op(const Other& scalar) \
|
||||||
{ \
|
{ \
|
||||||
return MatrixBase<Derived>::operator Op(scalar); \
|
return Eigen::MatrixBase<Derived>::operator Op(scalar); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
|
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
|
||||||
@ -108,19 +108,19 @@ EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, /=)
|
|||||||
|
|
||||||
#define _EIGEN_GENERIC_PUBLIC_INTERFACE(Derived, BaseClass) \
|
#define _EIGEN_GENERIC_PUBLIC_INTERFACE(Derived, BaseClass) \
|
||||||
typedef BaseClass Base; \
|
typedef BaseClass Base; \
|
||||||
typedef typename ei_traits<Derived>::Scalar Scalar; \
|
typedef typename Eigen::ei_traits<Derived>::Scalar Scalar; \
|
||||||
using Base::RowsAtCompileTime; \
|
typedef typename Eigen::ei_xpr_copy<Derived>::Type XprCopy; \
|
||||||
using Base::ColsAtCompileTime; \
|
enum { RowsAtCompileTime = Base::RowsAtCompileTime, \
|
||||||
using Base::MaxRowsAtCompileTime; \
|
ColsAtCompileTime = Base::ColsAtCompileTime, \
|
||||||
using Base::MaxColsAtCompileTime; \
|
MaxRowsAtCompileTime = Base::MaxRowsAtCompileTime, \
|
||||||
using Base::SizeAtCompileTime; \
|
MaxColsAtCompileTime = Base::MaxColsAtCompileTime, \
|
||||||
using Base::MaxSizeAtCompileTime; \
|
SizeAtCompileTime = Base::SizeAtCompileTime, \
|
||||||
using Base::IsVectorAtCompileTime; \
|
MaxSizeAtCompileTime = Base::MaxSizeAtCompileTime, \
|
||||||
typedef typename ei_xpr_copy<Derived>::Type XprCopy;
|
IsVectorAtCompileTime = Base::IsVectorAtCompileTime };
|
||||||
|
|
||||||
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) \
|
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) \
|
||||||
_EIGEN_GENERIC_PUBLIC_INTERFACE(Derived, MatrixBase<Derived>) \
|
_EIGEN_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::MatrixBase<Derived>) \
|
||||||
friend class MatrixBase<Derived>;
|
friend class Eigen::MatrixBase<Derived>;
|
||||||
|
|
||||||
#define EIGEN_ENUM_MIN(a,b) (((int)a <= (int)b) ? (int)a : (int)b)
|
#define EIGEN_ENUM_MIN(a,b) (((int)a <= (int)b) ? (int)a : (int)b)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user