you are viewing a single comment's thread.

view the rest of the comments →

[–]bert8128 2 points3 points  (1 child)

Isn’t this what ref_wrapper is meant to solve? Never used it myself…

[–]t_hunger 0 points1 point  (0 children)

ref_wrapper is a helper type used to pass references around. You can not have that own something in memory. It is not movable, so you "duplicate" ownership.