Can std::unique_ptr be better?