unique_ptr
is not assignable with normal assignment operator (the error says it's deleted). You can only move them:
bar.insert(bar.end(),
std::make_move_iterator(baz.begin()),
std::make_move_iterator(baz.end())
);
Of course, this transfers the ownership of the managed object and original pointers will have nullptr
value.