Search code examples
c++c++11powerpc

Deleted function on powerPC compiler, not on gcc


In my current project we have to compile a source for openSUSE - 12.1 and for powerPC.
The project is written in C++11.

The openSUS build is done with gcc-4.7.2
The powerPC build with powerpc-e500v2-linux-gnuspe

I have a pure virtual base class (virtual destructor and some virtual functions), let's call it VirtualIf

I now want to do this:

someStdMap[key] = std::vector<std::unique_ptr<VirtualIf> >();

to initialize the vector with unique ptr's and

someStdMap[key].push_back(std::move(uniquePtrToVirtualIf));

To add them to that vector

This works perfectly on the gcc builds but fails on the powerPC build with:

deleted function 'std::unique_ptr<_Tp, _Tp_Deleter>...

on both lines.

I know this error means that the default constructor is deleted, but why? and why the difference between the 2 compilers ? And how can i fix this for the arm build?


Solution

  • This seems to have been a compiler problem. Updating the compiler fixed the problem.