Re:Modernize C++: Sink Functions
by klipt on Thursday December 07, 2017 @09:09PM
(#15876168)
> "sink functions" should take an rvalue reference (which semantically means "take ownership of this parameter").
Doesn't that only work when the parameter is movable? For older classes that don't yet have move semantics, unique_ptr is an easy wrapper to give them efficient move semantics, is it not?
Doesn't that only work when the parameter is movable? For older classes that don't yet have move semantics, unique_ptr is an easy wrapper to give them efficient move semantics, is it not?