Since SerializeBinary will eventually invoke the move constructor of its std::unique_ptr parameter, it would be more correct to only allow the parameter to bind to an rvalue.
This prevents the parameter from being expected to outlive the call, and allows the function to be called in a more natural way - one that doesn't require an intermediate stack variable that is unusable after the call.
Since SerializeBinary will eventually invoke the move constructor of its std::unique_ptr parameter, it would be more correct to only allow the parameter to bind to an rvalue.
This prevents the parameter from being expected to outlive the call, and allows the function to be called in a more natural way - one that doesn't require an intermediate stack variable that is unusable after the call.