From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Roth To: egcs@cygnus.com Subject: std::auto_ptr bugs Date: Sun, 05 Apr 1998 17:27:00 -0000 Message-id: X-SW-Source: 1998-04/msg00200.html 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& 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