I came across the following code where Foo is any user-defined class:
boost::function<return_type (parameter)> f = boost::ref(instanceOfFoo);
And I have the following Qs: 1. What happens if you assign an instance of a class to the boost function pointer? I thought we could only assign functions to it. 2. Why is the boost ref sent and not just the value?