Pothos::Callable takes in various varieties of function pointers and stores everything internally as a std::function. But the class doesn't have a constructor that takes in a std::function.
The std::function class has a function target<T>() that can be used to return the equivalent function pointer, but if the std::function wraps, for example, the output of std::bind instead of a straight function, target<T>() returns null, and Pothos::Callable will throw bad_call_exception when called.
Pothos::Callable takes in various varieties of function pointers and stores everything internally as a std::function. But the class doesn't have a constructor that takes in a std::function.
The std::function class has a function
target<T>()
that can be used to return the equivalent function pointer, but if the std::function wraps, for example, the output of std::bind instead of a straight function,target<T>()
returns null, and Pothos::Callable will throw bad_call_exception when called.