Boost logo

Boost :

From: Philipp Robbel (robbel_at_[hidden])
Date: 2006-02-03 14:42:45


Hi all,

Here is an incompatibility issue I have been running into with VC8.0.
The code I am trying to compile is as follows (just a simple test case
to reproduce the error):

#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_proxy.hpp>

using namespace boost::numeric;
typedef ublas::matrix<double> Matrix;
typedef ublas::matrix_column<Matrix> Matrix_Col;

int main()
{
   Matrix mtx_v;

   Matrix_Col cv0(mtx_v,0), cv1(mtx_v,1);
   Matrix_Col::const_iterator cv0_ite(cv0.begin()),
cv1_ite(cv1.begin()); // line 13
}

This code compiles fine under gcc but VC8.0 issues the following two errors:

---------------------------

./boost/numeric/ublas/matrix_proxy.hpp(707) : error C2064: term does
not evaluate to a function taking 0 arguments
        ./boost/numeric/ublas/matrix_proxy.hpp(706) : while compiling
class template member function
'boost::numeric::ublas::matrix_column<M>::const_iterator::const_iterator(const
std::iterator<_Category,_Ty> &)'
        with
        [
            M=Matrix,
            _Category=boost::numeric::ublas::dense_random_access_iterator_tag,
            _Ty=double
        ]
        .\2d-morph.cpp(13) : see reference to class template
instantiation 'boost::numeric::ublas::matrix_column<M>::const_iterator'
being compiled
        with
        [
            M=Matrix
        ]
./boost/numeric/ublas/matrix_proxy.hpp(707) : error C2039: 'it_' : is
not a member of 'std::iterator<_Category,_Ty>'
        with
        [
            _Category=boost::numeric::ublas::dense_random_access_iterator_tag,
            _Ty=double
        ]
---------------------------

What I can tell from the errors above is that VC8.0 takes
cv0.begin()/cv1.begin() to return a std::iterator which is then passed
to the Matrix_Col::const_iterator constructor. The constructor then
tries to access it.it_ (see second error) which does not exist in
std::iterator.

Is there any issue with VC8.0 not returning
ublas::matrix_column<M>::iterator (but std::iterator instead) in the
begin() function of matrix_proxy.hpp (line 870)?

Any help how to work around this issue are greatly appreciated.

Regards,
Philipp Robbel


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