Boost logo

Boost :

From: Kresimir Fresl (fresl_at_[hidden])
Date: 2002-05-01 17:12:43


Hi,

it seems that there are still some missing `typename's ;o).
g++ 3.1 complains (for g++ it is a warning, not an error, but
Comeau's compiler treats it as error):

   /home/krcko/include/ublas/vector_et.h:82: warning: `typename
      numerics::scalar_const_reference<T>::value_type' is implicitly a
typename
   /home/krcko/include/ublas/vector_et.h:82: warning: implicit typename is
      deprecated, please see the documentation for details

========================================================
Here are the diffs:

============
`matrix_et.h'
-----------------------------------------------------------------------------

200c200
< matrix_const_reference<E>::expression_type
matrix_const_reference<E>::nil_;

---
 >     NUMERICS_TYPENAME matrix_const_reference<E>::expression_type 
matrix_const_reference<E>::nil_;
451c451
<     matrix_reference<E>::expression_type matrix_reference<E>::nil_;
---
 >     NUMERICS_TYPENAME matrix_reference<E>::expression_type 
matrix_reference<E>::nil_;
------------------------------------------------------------------------------
=============
`matrix_pr.h'
------------------------------------------------------------------------------
473c473
<     matrix_row<M>::matrix_type matrix_row<M>::nil_;
---
 >     NUMERICS_TYPENAME matrix_row<M>::matrix_type matrix_row<M>::nil_;
1163c1163
<     matrix_column<M>::matrix_type matrix_column<M>::nil_;
---
 >     NUMERICS_TYPENAME matrix_column<M>::matrix_type 
matrix_column<M>::nil_;
1823c1823
<     matrix_vector_range<M>::matrix_type matrix_vector_range<M>::nil_;
---
 >     NUMERICS_TYPENAME matrix_vector_range<M>::matrix_type 
matrix_vector_range<M>::nil_;
2240c2240
<     matrix_vector_slice<M>::matrix_type matrix_vector_slice<M>::nil_;
---
 >     NUMERICS_TYPENAME matrix_vector_slice<M>::matrix_type 
matrix_vector_slice<M>::nil_;
3094c3094
<     matrix_range<M>::matrix_type matrix_range<M>::nil_;
---
 >     NUMERICS_TYPENAME matrix_range<M>::matrix_type matrix_range<M>::nil_;
3969c3969
<     matrix_slice<M>::matrix_type matrix_slice<M>::nil_;
---
 >     NUMERICS_TYPENAME matrix_slice<M>::matrix_type matrix_slice<M>::nil_;
-------------------------------------------------------------------------------------
=============
vector_et.h
--------------------------------------------------------------------------------------
82c82
<     scalar_const_reference<T>::value_type 
scalar_const_reference<T>::nil_;
---
 >     NUMERICS_TYPENAME scalar_const_reference<T>::value_type 
scalar_const_reference<T>::nil_;
195c195
<     vector_const_reference<E>::expression_type 
vector_const_reference<E>::nil_;
---
 >     NUMERICS_TYPENAME vector_const_reference<E>::expression_type 
vector_const_reference<E>::nil_;
335c335
<     vector_reference<E>::expression_type vector_reference<E>::nil_;
---
 >     NUMERICS_TYPENAME vector_reference<E>::expression_type 
vector_reference<E>::nil_;
--------------------------------------------------------------------------------------
================
vector_pr.h
---------------------------------------------------------------------------------------
472c472
<     vector_range<V>::vector_type vector_range<V>::nil_;
---
 >     NUMERICS_TYPENAME vector_range<V>::vector_type vector_range<V>::nil_;
956c956
<     vector_slice<V>::vector_type vector_slice<V>::nil_;
---
 >     NUMERICS_TYPENAME vector_slice<V>::vector_type vector_slice<V>::nil_;
============================================================
============================================================
These changes (as well as those from my previous post) finally
reduced the number of Comeau's compiler error messages to
a manageable number, so that I succeeded to compile my examples
with it.
To compile with `como', I used settings for g++, ie. I simply
added in `config.h':
---------------------------------------------------------------------
107a108,112
 > #ifdef USE_COMO
 >
 > #define USE_GCC
 >
 > #endif
---------------------------------------------------------------------
como found some `minor' bugs and typos:
===============
matrix.h
------------------------------------------------------------------
2745c2745
<                     -- it;
---
 >                     -- it_;
------------------------------------------------------------------
===============
matrix_sp.h
-------------------------------------------------------------------
999c999
<             non_zeros = 0;
---
 >             non_zeros_ = 0;
1001,1002c1001,1002
<                 non_zeros += (*itv).size ();
<             return non_zeros;
---
 >                 non_zeros_ += (*itv).size ();
 >             return non_zeros_;
1988c1988
<         size_type non_zeros_;
---
 >         mutable size_type non_zeros_;
----------------------------------------------------------------------
[[`non_zeros_' must be `mutable' in `sparse_vector_of_sparse_vector'
because const function `non_zeros()' (lines 998-1003) modifies it.]]
==========================
vector_sp.h
-----------------------------------------------------------------------
522c522
<             return non_zeros;
---
 >             return non_zeros_;
------------------------------------------------------------------------
`como' also complains that
    "/home/krcko/include/ublas/iterator.h", line 519: error:
           identifier "base" is undefined
patch for `iterator.h' is:
-----------------------------------------------------------------------
24c24
< #ifdef USE_GCC
---
 > #if (defined USE_GCC) && (!defined USE_COMO)
506a507,509
 > #ifdef USE_COMO
 >         using std::reverse_iterator<I>::base;
 > #endif
562a566,568
 > #ifdef USE_COMO
 >         using std::reverse_iterator<I>::base;
 > #endif
641a648,650
 > #ifdef USE_COMO
 >         using std::reverse_iterator<I>::base;
 > #endif
==========================================
And finally, there are some missing includes in `traits.h':
--------------------------------------------------------------------------
19a20
 > #include <cmath>
20a22
 > #include <iterator>
---------------------------------------------------------------------------
[[<cmath> is needed for `std::fabs()' and `std::sqrt()' and
<iterator> for iterator tags.]]
and in `math.h':
-------------------------------------------------------------------------
20a21
 > #include <algorithm>
23d23
< #include "exception.h"
-------------------------------------------------------------------------
[[<algorithm> is needed for `std::max()', while `exception.h'
is superfluous.]]
Sincerely,
fres

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk