Boost logo

Ublas :

Subject: Re: [ublas] enable complex @ int
From: Jesse Perla (jesseperla_at_[hidden])
Date: 2009-09-29 09:29:32


Just be careful... I am using using this with autodifferentiation
which uses adl, it's own types, and specialized operations

-Jesse

On Sep 29, 2009, at 9:17 AM, "Matwey V. Kornilov" <matwey.kornilov_at_[hidden]
> wrote:

>
>>> I think it would be better to write in such way:
>>>
>>> template<R> std::complex<R> operator+ (int in1, const
>>> std::complex<R>&
>>> in2 ){
>>> return typename std::complex<R>::value_type(in1) + in2;
>>> }
>>>
>>>
>> That wouldn't conflict with stdlib?
>
> It is just your version that has been extended for both
> complex<float> and
> complex<double>.
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: jesseperla_at_[hidden]