This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
std::auto_ptr bugs
- To: egcs at cygnus dot com
- Subject: std::auto_ptr bugs
- From: Michael Roth <mroth at arago dot de>
- Date: Sun, 5 Apr 1998 20:56:38 +0200 (METDST)
Hi,
First, the std::auto_ptr is commented out in "memory" (egcs 1.0.*)
and their is a note that the class is still discussed by the C++
standardization committee. Is this really true ?
Second, if you uncomment std::auto_ptr their are several errors:
1.) 'auto_ptr& operator=(const auto_ptr& a)' misses a 'return *this'
after the closing bracket of the 'if' block.
2.) 'auto_ptr& operator=(const auto_ptr<T>& a)' misses the
'return *this' after the closing bracket of the 'if' block, too.
3.) IMHO 'X* get() const' is wrong. If I'm not false 'get()' should get
the ownership of the pointer back ('owns=true;' is missing) !?!?
4.) The line 'X* release const __STL_NOTHROW { owns = false; return ptr }'
is buggy. It misses a '()' after the word 'release'.
cu
Michael
o-------------------------------------------------------o
! arago, Michael Roth !
! Institut fuer komplexes Software Engineer !
! Datenmanagement GmbH eMail: mroth@arago.de !
! Fichtestr. 12 !
! 60316 Frankfurt am Main http://www.arago.de !
! Tel: +49-69-40568-0 Fax: +49-69-40568-111 !
o-------------------------------------------------------o