Michael Winter wrote:
There's no conversion operator that returns a value of type T* (where T is
the element type), so in the first case: no. The only way to get around
this would be to derive a class from this one with a method like:
template <class T>
class MyAutoPtr : public std::auto_ptr<T>
{
public:
operator( _Ty* ) const { return _Ptr; }
These identifiers are reserved for the implementation. C++ programs are
forbidden to use identifiers beginning with an underscore followed by
either an upper case letter or another underscore. Your standard library
probably does this, but that's because it is part of the implementation
and is required to do so - otherwise, it would be treading on names that
are reserved for *your* use.
Also, when you reply please quote some relevant context from the message
you are replying to. Otherwise we don't know exactly what message you
are replying to, and it may even be a message that we haven't received yet.
-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.