It’s a very convenient to make feedback through the std:: function and use it with a lambda or static functions. When it came to the method of the class, I did not immediately find how it can be implemented.
The answer found in MSDN, it looks like this

/ / Bind a class method.
c (bind1st (mem_fun (& square:: square_value), & s));

where the square:: square_value – class method
s – an instance of a class
c – a method of taking std:: function as an argument

std::function and a class method
Tagged on:         

Leave a Reply

Your email address will not be published. Required fields are marked *