Doesn\'t std::unique_ptr::get defeat the purpose of having a unique_ptr in the first place?
I would have expected this function to change its state so it holds
The rule I tend to follow is this: if the callee isn't mucking with lifetime/ownership, do not pass it a smart pointer; rather, pass in a raw C++ reference (preferred) or raw pointer. I find it far cleaner and more flexible to separate the concern of ownership from usage.