$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [proto] learning proto slowly, a small (math)complex library
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2011-01-10 16:48:11
On 10/01/11 22:42, alfC wrote:
> I translated the map_list_of example into the complex example. There
> is still work to do, the code doesn't work yet. I guess I have to
> still tell proto that "complex_cartesian_expr" (didn't know what other
> name to put) is of type proto::plus< proto::terminal<double> ,
> proto::multiplies<proto::terminal<double>, proto::terminal<i_tag> >
> I don't know how to do that. complete code at the end of the email.
try
std::complex<double> z = 4. + 5.i;
Incidentally, you should have a real transform able to turn any
complex_expression into a complex and not rely on a given fixed AST
structure.
What if i do z = i + i + 3 + 4*i ?
You have to look up transform.