2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-21 15:32:12 +00:00

DERIVED_HELPERS only seem to be unambigous

on some compiler. (CW9 and VC7.1/8 fail)
Provide sepecfic expression overload instead

svn path=/trunk/boost/boost/numeric/ublas/; revision=24797
This commit is contained in:
Michael Stevens
2004-08-28 11:35:47 +00:00
parent 8e970c2c08
commit c08d986ee7
4 changed files with 38 additions and 14 deletions

View File

@@ -1012,9 +1012,6 @@ namespace boost { namespace numeric { namespace ublas {
class diagonal_matrix:
public banded_matrix<T, F, A> {
public:
#ifndef BOOST_UBLAS_NO_DERIVED_HELPERS
BOOST_UBLAS_USING banded_matrix<T, F, A>::operator =;
#endif
typedef std::size_t size_type;
typedef banded_matrix<T, F, A> matrix_type;
@@ -1041,6 +1038,12 @@ namespace boost { namespace numeric { namespace ublas {
matrix_type::operator = (m);
return *this;
}
template<class AE>
BOOST_UBLAS_INLINE
diagonal_matrix &operator = (const matrix_expression<AE> &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<M> {
public:
#ifndef BOOST_UBLAS_NO_DERIVED_HELPERS
BOOST_UBLAS_USING banded_adaptor<M>::operator =;
#endif
typedef M matrix_type;
typedef banded_adaptor<M> adaptor_type;
@@ -2061,6 +2061,12 @@ namespace boost { namespace numeric { namespace ublas {
adaptor_type::operator = (m);
return *this;
}
template<class AE>
BOOST_UBLAS_INLINE
diagonal_adaptor &operator = (const matrix_expression<AE> &ae) {
adaptor_type::operator = (ae);
return *this;
}
};
}}}

View File

@@ -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.

View File

@@ -948,9 +948,6 @@ namespace boost { namespace numeric { namespace ublas {
class bounded_matrix:
public matrix<T, F, bounded_array<T, M * N> > {
public:
#ifndef BOOST_UBLAS_NO_DERIVED_HELPERS
BOOST_UBLAS_USING matrix<T, F, bounded_array<T, M * N> >::operator =;
#endif
BOOST_STATIC_CONSTANT (std::size_t, max_size1 = M);
BOOST_STATIC_CONSTANT (std::size_t, max_size2 = N);
typedef matrix<T, F, bounded_array<T, M * N> > 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<std::size_t MN2>
BOOST_UBLAS_INLINE
bounded_matrix &operator = (const matrix<T, F, bounded_array<T, MN2> > &m) {
matrix_type::operator = (m);
return *this;
}*/
template<class AE>
BOOST_UBLAS_INLINE
bounded_matrix &operator = (const matrix_expression<AE> &ae) {
matrix_type::operator = (ae);
return *this;
}
};
// Array based matrix class

View File

@@ -569,9 +569,6 @@ namespace boost { namespace numeric { namespace ublas {
class bounded_vector:
public vector<T, bounded_array<T, N> > {
public:
#ifndef BOOST_UBLAS_NO_DERIVED_HELPERS
BOOST_UBLAS_USING vector<T, bounded_array<T, N> >::operator =;
#endif
BOOST_STATIC_CONSTANT (std::size_t, max_size = N);
typedef vector<T, bounded_array<T, N> > 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<std::size_t N2>
BOOST_UBLAS_INLINE
bounded_vector &operator = (const vector<bounded_array<T,N2> > &v) {
vector_type::operator = (v);
return *this;
}*/
template<class AE>
BOOST_UBLAS_INLINE
bounded_vector &operator = (const vector_expression<AE> &ae) {
vector_type::operator = (ae);
return *this;
}
};
// Unit vector class