I'm porting a test platform to the C6000 simulator, using the latest toolchain I could find. The test framework uses auto_ptr extensively, and reassigns pointers, which causes a compile time error. I know that auto_ptr has changed a bit over time, but to my limited knowledge this should really really be okay. The code boils down to:
#include <memory>
struct A
{ int a;
};
std::auto_ptr<A> CreateA(void)
{
return std::auto_ptr<A>(new A);
}
void test(void)
{
std::auto_ptr<A> aPtr;
aPtr = CreateA();
}
Which unfortunately results in:
blah>C:/tools/ti/ccsv4/tools/compiler/c6000_7.4.5/bin/cl6x --include_path="C:/tools/ti/ccsv4/tools/compiler/c6000_7.4.5/include" test.cpp
"test.cpp", line 17: error: no operator "=" matches these operands
operand types are: std::auto_ptr<A> = std::auto_ptr<A>