Boost logo

Ublas :

From: Michael Stevens (mail_at_[hidden])
Date: 2006-05-18 06:21:22


Hi Neal,
On Monday, 1. May 2006 19:51, Neal Becker wrote:
> I've run into an issue with promote_traits. IIUC, it really isn't an issue
> with ublas, per se, but maybe with std::complex. Still, perhaps we can
> address it.
>
> It seems that constructs like
>
> promote_traits<std::complex<long double>, double>
>
> don't work, because they eventually do something like:
>
> typeof (std::complex<long double> + double),
>
> which unfortunately seem to be undefined.

Just a thought. Have you tried defining operator+ as a free function for these
parameters. Since the result type will be the same as the left parameter
promote_traits should pick this up.

Michael

-- 
___________________________________
Michael Stevens Systems Engineering
34128 Kassel, Germany
Phone/Fax: +49 561 5218038
Navigation Systems, Estimation  and
                 Bayesian Filtering
    http://bayesclasses.sf.net
___________________________________