I have code like this:
class RetInterface {...} class Ret1: public RetInterface {...} class AInterface { public: virtual boost::shared_ptr
maybe you could use an out parameter to get around "covariance with returned boost shared_ptrs.
void get_r_to(boost::shared_ptr& ) ...
since I suspect a caller can drop in a more refined shared_ptr type as argument.