Boost logo

Ublas :

Subject: [ublas] Compiler warnings with Visual C++ 2005 SP1
From: Prasun Mathur (prasun_mathur_at_[hidden])
Date: 2010-03-29 12:56:16


When using simple lu_factorize and lu_substitute, I get lots of compiler
warnings. I do get the right results, but I'm bugged about the warnings.
Is ublas not part of the boost code base ? is there something wrong with
my usage? how do i stop the warnings without suppressing individual
warnings in my Visual Studio project?

Warnings are as below:

TYPE 1

C:\Program Files\boost\boost_1_42_0\boost/numeric/ublas/traits.hpp(54) :
warning C4267: 'argument' : conversion from 'size_t' to 'const unsigned
int', possible loss of data
1> C:\Program
Files\boost\boost_1_42_0\boost/numeric/ublas/matrix_expression.hpp(288) :
see reference to class template instantiation
'boost::numeric::ublas::promote_traits<X,Y>' being compiled
1> with
1> [
1> X=__w64 unsigned int,
1> Y=__w64 unsigned int
1> ]
1> C:\Program
Files\boost\boost_1_42_0\boost/numeric/ublas/lu.hpp(157) : see reference
to class template instantiation
'boost::numeric::ublas::vector_matrix_binary<E1,E2,F>' being compiled
1> with
1> [
1>
E1=boost::numeric::ublas::vector_range<boost::numeric::ublas::matrix_column<boost::numeric::ublas::matrix<double>>>,
1>
E2=boost::numeric::ublas::vector_range<boost::numeric::ublas::matrix_row<boost::numeric::ublas::matrix<double>>>,
1> F=boost::numeric::ublas::scalar_multiplies<double,double>
1> ]
1> ..\..\src\CoxIngersollRossCalibration.cpp(78) : see reference to
function template instantiation '__w64 unsigned int
boost::numeric::ublas::lu_factorize<boost::numeric::ublas::matrix<T>,boost::numeric::ublas::permutation_matrix<T>>(M
&,PM &)' being compiled
1> with
1> [
1> T=double,
1> M=boost::numeric::ublas::matrix<double>,
1> PM=boost::numeric::ublas::permutation_matrix<double>
1> ]

TYPE 2
C:\Program Files\boost\boost_1_42_0\boost/numeric/ublas/storage.hpp(204) :
warning C4996: 'std::copy': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values
are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'
1> C:\Program Files\Microsoft Visual Studio
8\VC\include\xutility(2370) : see declaration of 'std::copy'
1> C:\Program
Files\boost\boost_1_42_0\boost/numeric/ublas/storage.hpp(201) : while
compiling class template member function
'boost::numeric::ublas::unbounded_array<T>
&boost::numeric::ublas::unbounded_array<T>::operator =(const
boost::numeric::ublas::unbounded_array<T> &)'
1> with
1> [
1> T=double
1> ]
1> C:\Program
Files\boost\boost_1_42_0\boost/numeric/ublas/vector.hpp(36) : see
reference to class template instantiation
'boost::numeric::ublas::unbounded_array<T>' being compiled
1> with
1> [
1> T=double
1> ]
1> C:\Program
Files\boost\boost_1_42_0\boost/numeric/ublas/lu.hpp(28) : see reference to
class template instantiation 'boost::numeric::ublas::vector<T,A>' being
compiled
1> with
1> [
1> T=double,
1> A=boost::numeric::ublas::unbounded_array<double>
1> ]
1> ..\..\src\CoxIngersollRossCalibration.cpp(64) : see reference to
class template instantiation
'boost::numeric::ublas::permutation_matrix<T>' being compiled
1> with
1> [
1> T=double
1> ]

TYPE 3
C:\Program Files\boost\boost_1_42_0\boost/numeric/ublas/traits.hpp(54) :
warning C4244: 'argument' : conversion from '__w64 int' to 'const int',
possible loss of data
1> C:\Program
Files\boost\boost_1_42_0\boost/numeric/ublas/matrix_expression.hpp(289) :
see reference to class template instantiation
'boost::numeric::ublas::promote_traits<X,Y>' being compiled
1> with
1> [
1> X=__w64 int,
1> Y=__w64 int
1> ]
1> C:\Program
Files\boost\boost_1_42_0\boost/numeric/ublas/lu.hpp(157) : see reference
to class template instantiation
'boost::numeric::ublas::vector_matrix_binary<E1,E2,F>' being compiled
1> with
1> [
1>
E1=boost::numeric::ublas::vector_range<boost::numeric::ublas::matrix_column<boost::numeric::ublas::matrix<double>>>,
1>
E2=boost::numeric::ublas::vector_range<boost::numeric::ublas::matrix_row<boost::numeric::ublas::matrix<double>>>,
1> F=boost::numeric::ublas::scalar_multiplies<double,double>
1> ]
1> ..\..\src\CoxIngersollRossCalibration.cpp(78) : see reference to
function template instantiation '__w64 unsigned int
boost::numeric::ublas::lu_factorize<boost::numeric::ublas::matrix<T>,boost::numeric::ublas::permutation_matrix<T>>(M
&,PM &)' being compiled
1> with
1> [
1> T=double,
1> M=boost::numeric::ublas::matrix<double>,
1> PM=boost::numeric::ublas::permutation_matrix<double>
1> ]

This e-mail is confidential and, if you are not the intended recipient,
please return it to us and do not retain or disclose it. We filter and
monitor e-mails in order to protect our system and the integrity,
confidentiality and availability of e-mails. We cannot guarantee that
e-mails are risk free and are not responsible for any related damage or
unauthorised alteration of e-mails by third parties after sending.

For more information on Standard Life group, visit our website
http://www.standardlife.com/

Standard Life plc (SC286832), Standard Life Assurance Limited* (SC286833)
and Standard Life Employee Services Limited (SC271355) are all registered
in Scotland at Standard Life House, 30 Lothian Road, Edinburgh EH1 2DH.
*Authorised and regulated by the Financial Services Authority. 0131 225
2552. Calls may be recorded/monitored. Standard Life group includes
Standard Life plc and its subsidiaries.

Please consider the environment. Think - before you print.