diff --git a/Eigen/src/Core/MapBase.h b/Eigen/src/Core/MapBase.h index b145a0b3d..cebed2bb6 100644 --- a/Eigen/src/Core/MapBase.h +++ b/Eigen/src/Core/MapBase.h @@ -168,6 +168,7 @@ template class MapBase template class MapBase : public MapBase { + typedef MapBase ReadOnlyMapBase; public: typedef MapBase Base; @@ -230,15 +231,13 @@ template class MapBase Derived& operator=(const MapBase& other) { - Base::Base::operator=(other); + ReadOnlyMapBase::Base::operator=(other); return derived(); } - // In theory MapBase should not make a using Base::operator=, - // and thus we should directly do: using Base::Base::operator=; - // However, this would confuse recent MSVC 2013 (bug 821), and since MapBase - // has operator= to make ICC 11 happy, we can also make MSVC 2013 happy as follow: - using Base::operator=; + // In theory we could simply refer to Base:Base::operator=, but MSVC does not like Base::Base, + // see bugs 821 and 920. + using ReadOnlyMapBase::Base::operator=; }; #undef EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS