diff options
author | Gael Guennebaud <g.gael@free.fr> | 2012-08-27 14:50:45 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2012-08-27 14:50:45 +0200 |
commit | ebe511334faa312c7efc43561b906b2b40427f53 (patch) | |
tree | 7bf61077f04ec37a605fe18e53568a2e564e6dfb /Eigen/src/Core/util | |
parent | 576d62db6429a2ebf15ea4baa9e0273c862a6dfe (diff) |
workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653)
Diffstat (limited to 'Eigen/src/Core/util')
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 5ea1fc8b4..1bbd24b8b 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -295,6 +295,12 @@ #if defined(_MSC_VER) && (!defined(__INTEL_COMPILER)) #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \ using Base::operator =; +#elif defined(__clang__) // workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653) +#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \ + using Base::operator =; \ + EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) { Base::operator=(other); return *this; } \ + template <typename OtherDerived> \ + EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; } #else #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \ using Base::operator =; \ |