|
Boost : |
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2008-07-16 17:55:16
Howard Hinnant wrote:
> The difference here is subtle, and some may even say insignificant.
> Others will say very significant. If the client of A also has a client
> C that uses the smart_ptr of A then the closer you can come to a "common
> well known type" the better. shared_ptr<B> is better known than
> unique_ptr<B, void(*)(B*)> or A::handle.
It's only a matter of name.
A template typedef is sufficient to get a better name.
template<typename T>
struct dynamic_unique_ptr : unique_ptr<T, void(*)(T*)>
{
};
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk