
10 Jan
2011
10 Jan
'11
9:48 p.m.
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.