diff --git a/include/boost/numeric/ublas/banded.hpp b/include/boost/numeric/ublas/banded.hpp index 5487e211..7ef528c3 100644 --- a/include/boost/numeric/ublas/banded.hpp +++ b/include/boost/numeric/ublas/banded.hpp @@ -1012,9 +1012,6 @@ namespace boost { namespace numeric { namespace ublas { class diagonal_matrix: public banded_matrix { public: -#ifndef BOOST_UBLAS_NO_DERIVED_HELPERS - BOOST_UBLAS_USING banded_matrix::operator =; -#endif typedef std::size_t size_type; typedef banded_matrix matrix_type; @@ -1041,6 +1038,12 @@ namespace boost { namespace numeric { namespace ublas { matrix_type::operator = (m); return *this; } + template + BOOST_UBLAS_INLINE + diagonal_matrix &operator = (const matrix_expression &ae) { + matrix_type::operator = (ae); + return *this; + } }; // Banded matrix adaptor class @@ -2039,9 +2042,6 @@ namespace boost { namespace numeric { namespace ublas { class diagonal_adaptor: public banded_adaptor { public: -#ifndef BOOST_UBLAS_NO_DERIVED_HELPERS - BOOST_UBLAS_USING banded_adaptor::operator =; -#endif typedef M matrix_type; typedef banded_adaptor adaptor_type; @@ -2061,6 +2061,12 @@ namespace boost { namespace numeric { namespace ublas { adaptor_type::operator = (m); return *this; } + template + BOOST_UBLAS_INLINE + diagonal_adaptor &operator = (const matrix_expression &ae) { + adaptor_type::operator = (ae); + return *this; + } }; }}} diff --git a/include/boost/numeric/ublas/config.hpp b/include/boost/numeric/ublas/config.hpp index 8b12f585..93d4af38 100644 --- a/include/boost/numeric/ublas/config.hpp +++ b/include/boost/numeric/ublas/config.hpp @@ -87,8 +87,6 @@ // Version 7.1 #if BOOST_MSVC == 1310 -#define BOOST_UBLAS_NO_DERIVED_HELPERS - // One of these workarounds is needed for MSVC 7.1 AFAIK // (thanks to John Maddock and Martin Lauer). // The second workaround looks like BOOST_UBLAS_QUALIFIED_TYPENAME. diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index a46428ae..214d4e58 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -948,9 +948,6 @@ namespace boost { namespace numeric { namespace ublas { class bounded_matrix: public matrix > { public: -#ifndef BOOST_UBLAS_NO_DERIVED_HELPERS - BOOST_UBLAS_USING matrix >::operator =; -#endif BOOST_STATIC_CONSTANT (std::size_t, max_size1 = M); BOOST_STATIC_CONSTANT (std::size_t, max_size2 = N); typedef matrix > matrix_type; @@ -975,6 +972,19 @@ namespace boost { namespace numeric { namespace ublas { matrix_type::operator = (m); return *this; } + /* FIXME This overload would be useful but is never chosen + template + BOOST_UBLAS_INLINE + bounded_matrix &operator = (const matrix > &m) { + matrix_type::operator = (m); + return *this; + }*/ + template + BOOST_UBLAS_INLINE + bounded_matrix &operator = (const matrix_expression &ae) { + matrix_type::operator = (ae); + return *this; + } }; // Array based matrix class diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index aa9e1e55..6f7aa6c6 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -569,9 +569,6 @@ namespace boost { namespace numeric { namespace ublas { class bounded_vector: public vector > { public: -#ifndef BOOST_UBLAS_NO_DERIVED_HELPERS - BOOST_UBLAS_USING vector >::operator =; -#endif BOOST_STATIC_CONSTANT (std::size_t, max_size = N); typedef vector > vector_type; @@ -595,6 +592,19 @@ namespace boost { namespace numeric { namespace ublas { vector_type::operator = (v); return *this; } + /* FIXME This overload would be useful but is never chosen + template + BOOST_UBLAS_INLINE + bounded_vector &operator = (const vector > &v) { + vector_type::operator = (v); + return *this; + }*/ + template + BOOST_UBLAS_INLINE + bounded_vector &operator = (const vector_expression &ae) { + vector_type::operator = (ae); + return *this; + } }; // Unit vector class