2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-23 16:12:09 +00:00

Comments regarding FIXME for expression instantiation order

This commit is contained in:
Michael Stevens
2005-02-13 13:38:03 +00:00
parent 8c2a8b0ca3
commit f7e5d7a738
2 changed files with 13 additions and 11 deletions

View File

@@ -25,6 +25,10 @@
namespace boost { namespace numeric { namespace ublas {
// Base class Matrix Expressions - see the Barton Nackman trick
// This class could define an common interface for all
// statically derived expression type classes.
// We implement the casts to the statically derived type.
template<class E>
class matrix_expression:
public ublas_expression<E> {
@@ -48,11 +52,6 @@ namespace boost { namespace numeric { namespace ublas {
typedef const matrix_indirect<const E> const_matrix_indirect_type;
typedef matrix_indirect<E> matrix_indirect_type;
// This class could define an common interface for all
// statically derived expression type classes.
// Due to a compiler deficiency - one can not reference class typedefs of E
// on MSVC 6.0 (error C2027) - we only implement the casts.
BOOST_UBLAS_INLINE
const expression_type &operator () () const {
return *static_cast<const expression_type *> (this);

View File

@@ -30,11 +30,14 @@ namespace boost { namespace numeric { namespace ublas {
// Base class for uBLAS staticaly derived expressions - see the Barton Nackman trick
// Provides numeric properties for linear algebra
// FIXME
// The template instantiation order needs to be analyses to ensure
// class typedefs of E are fully defined.
template<class E>
class ublas_expression {
public:
typedef E expression_type;
/* FIXME expression properties are undefined due to a template instantiation order problem
/* FIXME
typedef typename E::type_category type_category;
typedef typename E::value_type value_type;
*/
@@ -173,6 +176,9 @@ namespace boost { namespace numeric { namespace ublas {
// Base class for Vector Expressions - see the Barton Nackman trick
// This class could define an common interface for all
// statically derived expression type classes.
// We implement the casts to the statically derived type.
template<class E>
class vector_expression:
public ublas_expression<E> {
@@ -181,6 +187,8 @@ namespace boost { namespace numeric { namespace ublas {
typedef E expression_type;
typedef vector_tag type_category;
typedef abstract_tag simd_category;
// FIXME Template instantiation order problem
// typedef typename E::size_type size_type;
typedef noalias_proxy<E> noalias_proxy_type;
typedef const vector_range<const E> const_vector_range_type;
@@ -190,11 +198,6 @@ namespace boost { namespace numeric { namespace ublas {
typedef const vector_indirect<const E> const_vector_indirect_type;
typedef vector_indirect<E> vector_indirect_type;
// This class could define an common interface for all
// statically derived expression type classes.
// Due to a compiler deficiency - one can not reference class typedefs of E
// on MSVC 6.0 (error C2027) - we only implement the casts.
BOOST_UBLAS_INLINE
const expression_type &operator () () const {
return *static_cast<const expression_type *> (this);