The lambda expression in the find_if
call takes a Ptr
(aka unique_ptr<SceneNode>
) argument by value, which means it's attempting to copy the unique_ptr
; unique_ptr
s are non copyable, hence the error.
Change the lambda expression to the following:
[&] (Ptr const& p) -> bool { return p.get() == &node; }
// ^^^^^^
// take the argument by reference and avoid copying