$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Interest in boost.deepcopy
From: Julien Nitard (julien.nitard_at_[hidden])
Date: 2011-10-24 22:29:54
Hi,
> Consider an object hierarchy in which there may be multiple references to
> shared objects. A deep copy should give an identical, but entirely separate
> copy of the entire structure.
> Also consider eg std::map<std::string,T*>... the std::map copy constructor
> is not going to create new instances of T in the copy - this is a shallow
> copy.
>
If I understand properly, when you encounter a pointer you duplicate the
object pointed to. Is that right ? Does it work properly if (in your example
above) T is a polymorphic class ? If yes, how ?
Regards,
Julien