
16 Jul
2008
16 Jul
'08
9:55 p.m.
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*)> { };