From f7e5d7a7387b1bcfe22eedc4f957044a688593b7 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Sun, 13 Feb 2005 13:38:03 +0000 Subject: [PATCH] Comments regarding FIXME for expression instantiation order --- include/boost/numeric/ublas/matrix_expression.hpp | 9 ++++----- include/boost/numeric/ublas/vector_expression.hpp | 15 +++++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/boost/numeric/ublas/matrix_expression.hpp b/include/boost/numeric/ublas/matrix_expression.hpp index 722ce259..2a78d114 100644 --- a/include/boost/numeric/ublas/matrix_expression.hpp +++ b/include/boost/numeric/ublas/matrix_expression.hpp @@ -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 matrix_expression: public ublas_expression { @@ -48,11 +52,6 @@ namespace boost { namespace numeric { namespace ublas { typedef const matrix_indirect const_matrix_indirect_type; typedef matrix_indirect 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 (this); diff --git a/include/boost/numeric/ublas/vector_expression.hpp b/include/boost/numeric/ublas/vector_expression.hpp index 464b5098..0446d525 100644 --- a/include/boost/numeric/ublas/vector_expression.hpp +++ b/include/boost/numeric/ublas/vector_expression.hpp @@ -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 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 vector_expression: public ublas_expression { @@ -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 noalias_proxy_type; typedef const vector_range const_vector_range_type; @@ -190,11 +198,6 @@ namespace boost { namespace numeric { namespace ublas { typedef const vector_indirect const_vector_indirect_type; typedef vector_indirect 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 (this);