You unnecessarily wrap std::move
, just do Map m2 = std::move(m);
directly in main()
.
As others have noted, it's theoretically possible for m
to not be empty after this, so you can follow up with m.clear();
.
You unnecessarily wrap std::move
, just do Map m2 = std::move(m);
directly in main()
.
As others have noted, it's theoretically possible for m
to not be empty after this, so you can follow up with m.clear();
.