Hello, In the framwork I'm developing, I need to deep-copy expressions to store them in some sort of wrapper objects. This works fine in most cases, but when terminals are copied the value they refer to seems to be copied as well. In the following expression, "tau" is a POD struct with some coefficients that need to be computed, and compute_tau is a proto terminal, where the grammar is used to give meaning to the operator() : compute_tau(u, tau)
The problem is that I use this tau in other expressions that are defined later on, so every expression needs to refer to the same tau, but it seems that after proto::deep_copy, each expression has his own tau. Is there an easy way around this? Note that I also like to use things like tau.ps, with ps a double in the tau struct directly in expressions. Cheers, -- Bart _______________________________________________ proto mailing list proto@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/proto