|
Boost Users : |
From: kjfh kjnk (jedi200581_at_[hidden])
Date: 2004-06-11 15:18:34
Hi,
This simple code creates 2 ublas vector and computes
the inner_product. It does not compile with VC 7.1:
---------------------------------------------------
#include <iostream>
#include <string>
#include <boost/concept_check.hpp>
#include <boost/numeric/ublas/matrix.hpp>
namespace ublas = boost::numeric::ublas;
int main(int argc, char **argv)
{
ublas::vector<unsigned short> toto(3);
ublas::vector<double> tata(3);
double titi = ublas::inner_prod(toto, tata);
return 0;
}
---------------------------------------------------
Here is the compilation:
***************************************************
C:\Temp\ublas>cl -I"C:\Program Files\boost_1_31_0"
/EHsc ublas-test.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
13.10.3052 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All
rights reserved.
ublas-test.cpp
ublas-test.cpp(12) : error C2440: 'initializing' :
cannot convert from
'boost::numeric::ublas::vector_scalar_binary_traits<E1,E2,F>::result_type'
to 'double'
with
[
E1=boost::numeric::ublas::vector<unsigned
short>,
E2=boost::numeric::ublas::vector<double>,
F=boost::numeric::ublas::vector_inner_prod<unsigned
short,double,boost::mpl::if_c<false,unsigned
short,boost::numeric::ublas::promote_traits<unsigned
short,double>::builtin_promote_type>::type>
]
No user-defined-conversion operator available
that can perform this conversion, or the operator
cannot be called
C:\Temp\ublas>
****************************************************
It compiles well with with VC 6.0, but the result is
not good... (with a proper initialisation)
Anybody has an idea ?
JD
___________________________________________________________ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself http://uk.messenger.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