![]() |
Blitz Devel : |
From: Manoj Rajagopalan (rmanoj_at_[hidden])
Date: 2005-02-23 12:33:39
hi,
thank you! this worked. I didn't know about tinyvec-et.h.
cheers
Manoj
Patrick Guio wrote:
> On Thu, 10 Feb 2005, Manoj Rajagopalan wrote:
>
>> hi
>>
>> I'm using g++ 3.4.2 and the compiler complains of not finding the +
>> operator for two TinyVector<double, 3> objects. The candidate it lists is
>>
>> template<typename T> inline operator +(const T&, bz_null_operand)
>>
>> The hack i had to come up with is to create a new
>> TinyVector<double,3> object with one of the two summands in the
>> constructor and to use the += operator to add the other summand.
>>
>> Does anyone know why this is so?
>>
>> cheers
>> Manoj
>
>
> Hi,
>
> Did you include the header file for expression templates
> (<blitz/tinyvec-et.h>) for TinyVector?
> This piece of code compiles well with g++ 3.4.
> Sincerely,
> Patrick
>
>
> #include <blitz/tinyvec.h>
> #include <blitz/tinyvec-et.h>
>
> int main()
> {
> blitz::TinyVector<double, 3> a, b, c;
> c = a + b;
> c += a;
> }
>
> _______________________________________________
> Blitz-dev mailing list
> Blitz-dev_at_[hidden]
> http://www.oonumerics.org/mailman/listinfo.cgi/blitz-dev