I'm trying to create a functor that returns a shared_ptr by calling std::bind on std::make_shared, but the syntax is beyond me, or perhaps it's not even possible? Something like the following, assuming the constructor of MyBar takes a const reference to a MyFoo:
std::function<std::shared_ptr<MyBar>(const MyFoo &)> functor = std::bind(&std::make_shared<MyBar>, std::placeholders::_1);