In the GUI thread I created a std::function object that captures shared_from_this() pointer. After that the std::function object was std::moved several times by another thread (but the object has never been copied). And finally, the std::function object was called by the main thread and destroyed by the main thread.
Is it safe to use std::shared ptr this way?