
Cody H. answered 05/30/21
C++ / python Software Engineer for Autonomous Vehicle Companies
Depending on the scenario, you either want to pass a std::unqiue_ptr by reference or use std::move.
If you want the pointer to remain valid in the calling code, it should be passed by reference.
If you are okay to "give up" the pointer in the calling code, pass by value and use std::move.