Hi,
Since the function return a temporary and a temorary can be bind only to a const reference, the compiler should autopatically convert it to auto_ptr_ref and use the operator
auto_ptr& operator= (auto_ptr_ref<X> r)
While it seem to me that the C6000 TI library defines only the operator:
auto_ptr<X>& operator=(auto_ptr_ref<X& r) //TI bug or non C++ std compliance?
That is another reference to non-const object and again cannot be bind to a temporary.
Note that auot_ptr_ref "is an instrumental class to allow certain conversions that allow auto_ptr objects to be passed to and returned from functions" (from www.cplusplus.com)