Yes it smells. This is a copy so constness does not prevent shared_ref to take a copy of the underlying pointer...