Subject: [Boost-users] [function] Defect or feature?
From: Germán Diago (germandiago_at_[hidden])
Date: 2009-11-09 13:38:55


Hello. I think this code should work (or convince me why not):

#include <boost/function.hpp>

class A {};
class B : public A {};

typedef boost::function<void (A &)> F;

void hello(B &)
{
}

int main()
{
   F f(&hello);
}

Since A & can accept Bs &, should this code work?