error: call to implicitly-deleted copy of 'unique_ptr<Searchable>'
unique_ptr<Searchable> current(std::move(searchSpace.top()));
Hello,
I am trying to figure out why this doesn't compile. Search space is priority queue and I am trying to move rvalue searchSpace.top() to new current object.
Strangely enough, If I change priority queue to deque :
unique_ptr<Searchable> current(std::move(Q.front()));
This worked fine when Q is deque.
So why is the latter one working not the first one?
rest of the error message:
copy constructor is implicitly deleted because 'unique_ptr<Searchable,
std::__1::default_delete<Searchable> >' has a user-declared move
constructor
_LIBCPP_INLINE_VISIBILITY unique_ptr(unique_ptr&& __u) _NOEXCEPT