Boost logo

Boost :

From: Yitzhak Sapir (yitzhaks_at_[hidden])
Date: 2002-06-18 06:17:03

> Bjorn wrote:
> It's bad because it introduces a dependency, without adding significant value (IMHO).

Most of us don't change <memory> on a regular basis. So why is the dependency problematic? What do you lose from it? I would like to have this, but for me, this would be syntactic sugar, since I can accomplish the same thing with calling release() before passing it to the constructor. Besides, standard library headers sometimes include a lot more than you might think they include. I think dependencies should be few, but dependencies are not that bad when the element they depend on is pretty much constant.

> Declare the auto_ptr const. This comes very close to the behavior of scoped_ptr, with the exception that you
> can reset the scoped_ptr, but not the auto_ptr.

And you force initialization in the constructor initialization list if it is a class member.

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