A back, I came across the question of how to pass the called function returned by bind (let's call it A) to another function (let's call it B), which expects a parameter that is a pointer to a function from A. I found that the called A returned bind, has a very complex type and therefore abandoned my approach.
Then I found out about the βfunctionβ in the function header, which sounded as if it had solved my problem. However, after several attempts, I was again thwarted! Maybe you can help? Here is the code that will not work:
#include <iostream>
All I want to do is first create a new callable with bind, and then send this related function to another function as a parameter. If possible, I do not want to deal with the messy type returned by bind.
I am open to alternative approaches to solving this problem.
source share