This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: member-template bug in egcs
- To: oliva at dcc dot unicamp dot br
- Subject: Re: member-template bug in egcs
- From: Klaus-Georg Adams <Klaus-Georg dot Adams at chemie dot uni-karlsruhe dot de>
- Date: Wed, 19 Nov 1997 18:23:46 +0100
- CC: egcs-bugs at cygnus dot com
> Seems like you just can't do it with egcs :-( :-(
Well, there should be a way, otherwise how would you implement a
working auto_ptr?
Take a look in $(prefix)/include/g++/memory. If you fix the obvious
typos and compile something like
#include <memory>
int main()
{
auto_ptr<int> pi( new int );
auto_ptr<long> pl( new long );
pi = pl;
return 0;
}
which is supposed to work according to the CD2, you get the same
errors.
BTW: Scott Meyers offers a sample implementation of auto_ptr at
http://cseng.aw.com/bookdetail.qry?ISBN=0-201-63371-X&ptype=634
which uses
template<class X> class auto_ptr {
template<class Y> friend class auto_ptr;
public:
That would be nice to have :-)
-- kga
-------------------------------------------------------------------------
Klaus-Georg Adams Email: Klaus-Georg.Adams@chemie.uni-karlsruhe.de
Institut f. Anorg. Chemie II Tel: 0721 608 3485
Uni Karlsruhe
-------------------------------------------------------------------------