mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-09 06:31:47 +08:00
Fix bug #1000: Manually inherit assignment operators for MSVC 2013 and later (as required by the standard).
This commit is contained in:
parent
058fa781d7
commit
84eeabd223
@ -313,7 +313,7 @@ namespace Eigen {
|
|||||||
// just an empty macro !
|
// just an empty macro !
|
||||||
#define EIGEN_EMPTY
|
#define EIGEN_EMPTY
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER < 1900) && (!defined(__INTEL_COMPILER))
|
#if defined(_MSC_VER) && (_MSC_VER < 1800) && (!defined(__INTEL_COMPILER))
|
||||||
#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
|
#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
|
||||||
using Base::operator =;
|
using Base::operator =;
|
||||||
#elif defined(__clang__) // workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653)
|
#elif defined(__clang__) // workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653)
|
||||||
@ -332,8 +332,11 @@ namespace Eigen {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
|
/** \internal
|
||||||
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
|
* \brief Macro to manually inherit assignment operators.
|
||||||
|
* This is necessary, because the implicitly defined assignment operator gets deleted when a custom operator= is defined.
|
||||||
|
*/
|
||||||
|
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Just a side note. Commenting within defines works only by documenting
|
* Just a side note. Commenting within defines works only by documenting
|
||||||
|
@ -231,7 +231,7 @@ class Quaternion : public QuaternionBase<Quaternion<_Scalar,_Options> >
|
|||||||
public:
|
public:
|
||||||
typedef _Scalar Scalar;
|
typedef _Scalar Scalar;
|
||||||
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Quaternion)
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Quaternion)
|
||||||
using Base::operator*=;
|
using Base::operator*=;
|
||||||
|
|
||||||
typedef typename internal::traits<Quaternion>::Coefficients Coefficients;
|
typedef typename internal::traits<Quaternion>::Coefficients Coefficients;
|
||||||
@ -341,7 +341,7 @@ class Map<const Quaternion<_Scalar>, _Options >
|
|||||||
public:
|
public:
|
||||||
typedef _Scalar Scalar;
|
typedef _Scalar Scalar;
|
||||||
typedef typename internal::traits<Map>::Coefficients Coefficients;
|
typedef typename internal::traits<Map>::Coefficients Coefficients;
|
||||||
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Map)
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
|
||||||
using Base::operator*=;
|
using Base::operator*=;
|
||||||
|
|
||||||
/** Constructs a Mapped Quaternion object from the pointer \a coeffs
|
/** Constructs a Mapped Quaternion object from the pointer \a coeffs
|
||||||
@ -378,7 +378,7 @@ class Map<Quaternion<_Scalar>, _Options >
|
|||||||
public:
|
public:
|
||||||
typedef _Scalar Scalar;
|
typedef _Scalar Scalar;
|
||||||
typedef typename internal::traits<Map>::Coefficients Coefficients;
|
typedef typename internal::traits<Map>::Coefficients Coefficients;
|
||||||
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Map)
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
|
||||||
using Base::operator*=;
|
using Base::operator*=;
|
||||||
|
|
||||||
/** Constructs a Mapped Quaternion object from the pointer \a coeffs
|
/** Constructs a Mapped Quaternion object from the pointer \a coeffs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user