Capture shared_ptr in lambda
I want to capture a shared_ptr in my lambda expression. Tried two methods: Capture the shared pointer error: invalid use of non-static data member A::ptr Create a weak pointer and capture it (Found this via some results online). I’m not sure if I’m doing it the right way error: ‘const class std::weak_ptr’ has no member… Read More Capture shared_ptr in lambda