Mam problem z następującym kodem:
class gameObject
{
// (...)
};
class spaceship : gameObject
{
// (...)
}
std::list<std::unique_ptr<gameObject>> objects;
objects.push_back(std::unique_ptr<gameObject>(new spaceship);
auto test = objects.begin();
objects.erase(test);
error: no matching function for call to 'std::list<std::unique_ptr<gameObject> >::erase(gameObject&) const'|
note: candidates are:|
note: std::list<_Tp, _Alloc>::iterator std::list<_Tp, _Alloc>::erase(std::list<_Tp, _Alloc>::iterator)
Czy ktoś wie co jest nie tak? próbowałem *erase(test) lub **erase(test) ale ciągle otrzymuje ten sam problem.