Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-01-03 11:07:22

Conversion from std::auto_ptr<T> to boost::shared_ptr<T> should still
be possible without member templates:

      shared_ptr(std::auto_ptr<T>& r) {
         pn = new long(1); // may throw
         px = r.release(); // fix: moved here to stop leak if new throws

A larger question: shouldn't this constructor (and the corresponding
member template) be made _explicit_?

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