By using std::function rather than function pointers, users can invoke
more complex callback functions such as non-static methods via the use of std::bind.
This is a backwards compatible change as function pointers coerce into std::functions. I've verfied as much by compiling and running an existing project and it works without any modifications.
I have not updated any documentation as it doesn't explicitly say "function pointer" which would now be wrong, just "function" which could mean std::function.
By using
std::function
rather than function pointers, users can invoke more complex callback functions such as non-static methods via the use ofstd::bind
.This is a backwards compatible change as function pointers coerce into
std::function
s. I've verfied as much by compiling and running an existing project and it works without any modifications.I have not updated any documentation as it doesn't explicitly say "function pointer" which would now be wrong, just "function" which could mean
std::function
.