mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-02 00:34:14 +08:00
bug #920: fix MSVC 2015 compilation issues
This commit is contained in:
parent
b8d9eaa19b
commit
25c7d9164f
@ -172,6 +172,7 @@ template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
|
|||||||
template<typename Derived> class MapBase<Derived, WriteAccessors>
|
template<typename Derived> class MapBase<Derived, WriteAccessors>
|
||||||
: public MapBase<Derived, ReadOnlyAccessors>
|
: public MapBase<Derived, ReadOnlyAccessors>
|
||||||
{
|
{
|
||||||
|
typedef MapBase<Derived, ReadOnlyAccessors> ReadOnlyMapBase;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef MapBase<Derived, ReadOnlyAccessors> Base;
|
typedef MapBase<Derived, ReadOnlyAccessors> Base;
|
||||||
@ -239,15 +240,13 @@ template<typename Derived> class MapBase<Derived, WriteAccessors>
|
|||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
Derived& operator=(const MapBase& other)
|
Derived& operator=(const MapBase& other)
|
||||||
{
|
{
|
||||||
Base::Base::operator=(other);
|
ReadOnlyMapBase::Base::operator=(other);
|
||||||
return derived();
|
return derived();
|
||||||
}
|
}
|
||||||
|
|
||||||
// In theory MapBase<Derived, ReadOnlyAccessors> should not make a using Base::operator=,
|
// In theory we could simply refer to Base:Base::operator=, but MSVC does not like Base::Base,
|
||||||
// and thus we should directly do: using Base::Base::operator=;
|
// see bugs 821 and 920.
|
||||||
// However, this would confuse recent MSVC 2013 (bug 821), and since MapBase<Derived, ReadOnlyAccessors>
|
using ReadOnlyMapBase::Base::operator=;
|
||||||
// has operator= to make ICC 11 happy, we can also make MSVC 2013 happy as follow:
|
|
||||||
using Base::operator=;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS
|
#undef EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
/// \internal EIGEN_COMP_MSVC_STRICT set to 1 if the compiler is really Microsoft Visual C++ and not ,e.g., ICC
|
/// \internal EIGEN_COMP_MSVC_STRICT set to 1 if the compiler is really Microsoft Visual C++ and not ,e.g., ICC
|
||||||
#if EIGEN_COMP_MSVC && !(EIGEN_COMP_ICC)
|
#if EIGEN_COMP_MSVC && !(EIGEN_COMP_ICC)
|
||||||
#define EIGEN_COMP_MSVC_STRICT 1
|
#define EIGEN_COMP_MSVC_STRICT _MSC_VER
|
||||||
#else
|
#else
|
||||||
#define EIGEN_COMP_MSVC_STRICT 0
|
#define EIGEN_COMP_MSVC_STRICT 0
|
||||||
#endif
|
#endif
|
||||||
@ -592,7 +592,7 @@ namespace Eigen {
|
|||||||
// just an empty macro !
|
// just an empty macro !
|
||||||
#define EIGEN_EMPTY
|
#define EIGEN_EMPTY
|
||||||
|
|
||||||
#if EIGEN_COMP_MSVC_STRICT
|
#if EIGEN_COMP_MSVC_STRICT && EIGEN_COMP_MSVC < 1900
|
||||||
#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
|
#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
|
||||||
using Base::operator =;
|
using Base::operator =;
|
||||||
#elif EIGEN_COMP_CLANG // workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653)
|
#elif EIGEN_COMP_CLANG // workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user