To make the `set_factory` overloads work replace:

```
auto factory =
    boost::make_shared< object_factory_impl<Factory> >();
```

with 

```
boost::shared_ptr<object_factory> factory =
    boost::make_shared< object_factory_impl<Factory> >();
```