Boost logo

Boost :

From: Ulrich Eckhardt (doomster_at_[hidden])
Date: 2006-03-29 02:18:14

On Wednesday 29 March 2006 08:05, Václav Veselý wrote:
> I'm confused with syntax. new_<T> always creates auto_ptr<T>. How can I
> create for example shared_ptr<T>?

You probably can't, but:
 - std::auto_ptr is much less resource intensive (shared_ptr requires an
additionally, dynamically-allocated structure to hold some internals)
 - you don't need to, as auto_ptr converts to shared_ptr, there is a special
ctor taking an auto_ptr


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