
Eric Niebler <eric@boost-consulting.com> writes:
deep_copy() uses generate<> now. Let me know if you still have problems.
Works now, thanks. It maybe worth mentioning (in the docs as well) that the type returned by deep_copy is different from the type of the expression being copied (it has to be because of ref-to-val) It is obvious once you're into proto, but might be surprising at first. If you can use BOOST_PROTO_AUTO everything is taken care of, but if you're forced to declare a variable somewhere and initialize it somewhere else you've to declare it with BOOST_TYPEOF ((proto::deep_copy (my - proto + expr))). This is the case when initializing a static class member, although your suggestion from your other message in this thread of extending preserving POD-ness probably solves this problem as well. Thanks again, Maurizio