Topic: Auto_ptr defect report


Author: Lisa Lippincott <lisa_lippincott@bigfix.com>
Date: 1999/11/15
Raw View
Issue 127 for the library working group addresses two problems with
the current auto_ptr, but the proposed resolution adds a third change,
which I don't understand.

The suggestion is to make the conversion to auto_ptr_ref const,
changing the signature to

      template<class Y> operator auto_ptr_ref<Y>() const throw();

All I can see that change doing is allowing ownership to be stolen
from a const auto_ptr:

      const auto_ptr<T> originalOwner( new T );
      auto_ptr<T> theif = originalOwner;

What is the intent here?

                                             --Lisa Lippincott


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]