std-tr1-function

Virtual member functions and std::tr1::function: How does this work?

Here is a sample piece of code. Note that B is a subclass of A and both provide a unique print routine. Also notice in main that both bind calls are to &A::print, though in the latter case a reference to B is passed. #include <iostream> #include <tr1/functional> struct A { virtual void print() { std::cerr << "A" << std:...