That line is actually calling the copy assignment operator, not the copy constructor. That's the function declared as
Inventory& operator=(const Inventory&);
Note that player.GetInventory()
is an object that already exists, so it cannot invoke the copy constructor, simply because you're not constructing anything.
If you want to forbid inventories from being copied, delete these functions:
Inventory(const Inventory&) = delete;
Inventory& operator=(const Inventory&) = delete;
Or, if your compiler lacks C++11 support, declare them as private
and don't provide a definition.
private:
Inventory(const Inventory&);
Inventory& operator=(const Inventory&);