boost::make_shared takes const ref, need to wrap non-const ref in boost::ref