------- Comment #2 from stvwooddell at embarqmail dot com 2010-02-20 18:01 ------- This compiles for you?
virtual ptr clone () const { return new object(*this); } gives me the error that a function matching the copy constructor does not exist: n file included from ../objects/map.cpp:27: ../objects/../include/object.hpp: In member function virtual auto_ptr<object> object::clone() const: ../objects/../include/object.hpp:80: error: no matching function for call to auto_ptr<object>::auto_ptr(auto_ptr<object>) ../objects/../include/global.hpp:73: note: candidates are: auto_ptr<type>::auto_ptr(auto_ptr<type>&) [with type = object] ../objects/../include/global.hpp:71: note: auto_ptr<type>::auto_ptr(type*) [with type = object] make: *** [objects/map.o] Error 1 It is my understanding that all the forms should work by creating a (anonymous) object, then call the copy constructor passing that object as it's only argument. In what gcc version or configuration does it work? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43127