Boost logo

Ublas :

From: Hongyu Miao (jackymiao_at_[hidden])
Date: 2007-09-19 09:14:36

Thanks, Paul. Honestly, I didn't get a chance to read the link in your reply; but thanks very much for making the point clear. I've beening using C/C++ about 9 years; Intel C++, VC++ and GCC are all the compilers I've used. But I'm not a programmer, I just sometimes need to do some programming for scientific problems. Please don't feel sorry for today's programmers, :).

Hongyu Miao

From:Paul C. Leopardi
Date:2007-09-18 19:10:44
Subject:Re: [ublas] Bug Report: ublas::matrix

Hello Hongyu Miao,
On Mon, 17 Sep 2007, Hongyu Miao wrote:
> Thanks, Paul. I put a "double" before i*A4.size2() and it did work.
> However, I declared i and j to be int, not size_type or unsigned int; so
> the arihmetic conversions should not treat the result as unsigned number,
> am I right? Thanks again.
> BTW: I'm using BOOST v1.34.1 and VS 2005 on Windows.

Please read 5.9 again. It says:
"Then, if either operand is unsigned long the other shall be converted to
unsigned long."

You have

which is
(int * unsigned long) - int

which becomes
unsigned long - int

which becomes
unsigned long

How long have you been programming in C and C++ and how many other compilers
have you used?
Best, Paul
ublas mailing list