Again, using swap here costs you 3 shared_ptr move assignment calls and gains you nothing