I have a class A
template class A : public std::auto_ptr { typedef std::auto_ptr Super; public: A() : Super() { }
I'd guess you're lacking A(A const & o).
A(A const & o)
VS (incorrectly) permits getting a non-const reference to a temporary, g++ behaves properly