Boost logo

Boost :

From: Anand Shankar (anand.shankar.k_at_[hidden])
Date: 2007-03-25 16:11:09

Hi Sohail,


This leads me to belive that in the case you mention, the cloning_ptr stores
pointers for cloning and object deletion.

Your example is interesting because it requires that the `delete mechanism'
supplied as a template policy parameter as well.

template<typename T, typename Clone_policy=Use_new, typename
class Cloned_ptr { ... };

Here Use_new, Use_delete help default to using new and copy constructor for
cloning and using
delete for object deletion.

I've had to write such a class and also something very similar to
Boost::ptr_vector in course
of my work.

Best regards,

Boost list run by bdawes at, gregod at, cpdaniel at, john at