Boost logo

Boost Users :

From: Tux Han (tuxhan_at_[hidden])
Date: 2005-05-10 01:33:19


I wrote a simple program using uBLAS under vc 7.1, but
got so many warnings, how can I correct it?

The code is:
----------------------
#include <boost/numeric/ublas/matrix.hpp>

namespace ublas = boost::numeric::ublas;

int main(int argc, _TCHAR* argv[])
{
    ublas::identity_matrix<double> A(4);
    ublas::identity_matrix<double> B(4);

    prod(A, B);
        return 0;
}
------------------
But I got the following warning:
d:\Project\Libraries\boost_1_32_0\boost\numeric\ublas\traits.hpp(941)
: warning C4267: 'argument' : conversion from 'size_t'
to 'const unsigned int', possible loss of data
       
d:\Project\Libraries\boost_1_32_0\boost\numeric\ublas\matrix_expression.hpp(4462)
: see reference to class template instantiation
'boost::numeric::ublas::promote_traits<X,Y>' being
compiled
        with
        [
           
X=boost::numeric::ublas::identity_matrix<double>::size_type,
           
Y=boost::numeric::ublas::identity_matrix<double>::size_type
        ]
        d:\test\boosttest\boosttest\boosttest.cpp(14)
: see reference to class template instantiation
'boost::numeric::ublas::matrix_matrix_binary<E1,E2,F>'
being compiled
        with
        [
           
E1=boost::numeric::ublas::identity_matrix<double>,
           
E2=boost::numeric::ublas::identity_matrix<double>,
           
F=boost::numeric::ublas::matrix_matrix_prod<double,double,boost::numeric::ublas::matrix_matrix_binary_traits<double,boost::numeric::ublas::identity_matrix<double>,double,boost::numeric::ublas::identity_matrix<double>>::promote_type>
        ]
d:\Project\Libraries\boost_1_32_0\boost\numeric\ublas\traits.hpp(941)
: warning C4244: 'argument' : conversion from '__w64
int' to 'const int', possible loss of data
       
d:\Project\Libraries\boost_1_32_0\boost\numeric\ublas\matrix_expression.hpp(4463)
: see reference to class template instantiation
'boost::numeric::ublas::promote_traits<X,Y>' being
compiled
        with
        [
           
X=boost::numeric::ublas::identity_matrix<double>::difference_type,
           
Y=boost::numeric::ublas::identity_matrix<double>::difference_type
        ]
Linking...

How to correct it? thank you very much:)

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net