Boost logo

Boost :

From: Maurizio Vitale (mav_at_[hidden])
Date: 2007-05-23 09:28:51


Eric Niebler <eric_at_[hidden]> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk