![]() |
Blitz Bugs : |
From: Patrick Guio (Patrick.Guio_at_[hidden])
Date: 2004-12-22 08:13:16
On Mon, 13 Dec 2004, Dr. Hans Ekkehard Plesser wrote:
Hi Hans,
Thanks for this report.
Actually things have changed between the two releases here.
The "new" expression template machinery is used there now.
For a temporary fix you can patch the file blitz/array/ops.h by adding the
following entry
diff -r1.6 ops.h
90a91
> BZ_DECLARE_ARRAY_ET_SCALAR_OPS(long)
Cheers,
--
Patrick Guio
Para//ab, Bergen Centre for Computational Science
Thormøhlensgt. 55, N-5008 Bergen, Norway
Tel : +47 55584361 - Fax: +47 55584295
Mail: echo cngevpx.thvb_at_oppf.hvo.ab | perl -pe 'y/a-z/n-za-m/'
URL : http://www.bccs.uib.no
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi!
>
> The following program will compile with blitz-0.8 if and only if the variable
> n is of type int. For all other integer types (long, unsigned int), gcc v.
> 3.3.4 and 3.4.3 throw an ambiguous overload error. This problem does not
> occur with Blitz++-0.7.
>
> - ----------------
> #include <blitz/array.h>
>
> int main()
> {
> blitz::Array<int, 1> A(1);
>
> //int n = 1; // ok
> long n = 1; // ambiguous overload error
>
> A = blitz::tensor::i + n;
>
> return 0;
> }
> - -----------------
>
> I realize that this change in behavior compared to 0.7 may be the consequence
> of an important design decision elsewhere, but it should at least be
> documented.
>