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
#include
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::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::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