VC8.0 incompatibility issue with iterators

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

VC8.0 incompatibility issue with iterators

Philipp Robbel
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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: VC8.0 incompatibility issue with iterators

David Abrahams
Philipp Robbel <[hidden email]> writes:

> 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;

If this is a ublas problem you should probably post it to the ublas
mailing list.  The ublas developers don't tend to watch this list,
IIRC.

http://www.boost.org/more/mailing_lists.htm#ublas

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: VC8.0 incompatibility issue with iterators

John Maddock
> If this is a ublas problem you should probably post it to the ublas
> mailing list.  The ublas developers don't tend to watch this list,
> IIRC.

Unfortunately I think that list and the ublas developers are pretty much
past history these days, there are a few helpful soles like Toon Knapen that
help out when they can, but otherwise it's likely to be a <shrug> sadly...

John.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: VC8.0 incompatibility issue with iterators

Philipp Robbel
> Unfortunately I think that list and the ublas developers are pretty much
> past history these days, there are a few helpful soles like Toon Knapen that
> help out when they can, but otherwise it's likely to be a <shrug> sadly...

I posted to the ublas list and got a very helpful reply by Michael
Stevens, see http://lists.boost.org/MailArchives/ublas/2006/02/0956.php.
He has checked in the necessary fixes into CVS HEAD.

Best,
Philipp

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost