2 Comments
User's avatar
Damian Tomczak's avatar

What is the purpose of passing std::move(iface) to function taking by value?

void user(SomeInterface data) {

Expand full comment
Šimon Tóth's avatar

Well, in this case we can't copy, since the object isn't copyable because of the std::unique_ptr. The alternative would be to pass by const-ref.

Expand full comment