I have a class
class MyClass
{
typedef std::function<void(const std::string &str> SomeFunc;
SomeFunc Func;
}
I want to have set for this function. I did one
void MyClass::SetFunc(SomeFunc Func1)
{
Func = Func1;
}
I need in my class funtion as member and I want to use std::function, because it's alowes to use lambda. If the lambda is complicated, I will need move of function. If lambda is simply, a copy will be nice. And i don't know how to do it