Take member functions and objects as arguments for functions and capture member functions in std::bind
std::function<void()>Func=std::bind(&Foo::FooFunc,&foo);
as in
std::function<void()>Func=[&Foo::FooFunc equivalent, foo]( ) {What to do to call FooFunc}
Would it be possible to ?
Also, if possible, what kind of code would it be?
std::function<void()>Func=[&foo]{foo->Foo::FooFunc();};
Or omit it if you don't need to specify the class name
std::function<void()>Func=[&foo]{foo->FooFunc();};
and so on.
© 2024 OneMinuteCode. All rights reserved.