A method to implement anonymous callbacks in C++. Using static_cast and variable argument list.