Hi, I would greatly appreciate if you could help me fixing this.

So, a the simulation runs, different body parts represented by classes declared in the Player Class (e.g. Head, Body, Legs and Weapons) take damage. When this happens, I am storing a pointer to the damaged part in a map belonging to the player class, with the key value representing the priority in the subsequent repair queue:

In the player class:

Code:
map<int, shared_ptr<PartBase>, greater<int>> DamageLog;
Example of storage:

Code:
auto HeadPtr = std::make_shared<Part>(Head);
if (Head.Critical > 0) DamageLog.insert(make_pair(200, HeadPtr));
With 200 being a priority repair value;

Each part is derived from PartBase and each overrides the Repair() method. At the end parts get repaired by calling:

Code:
for (auto const& item : player.DamageLog) item.second->Repair();
Now, the PROBLEM is that Weapons are stored in an array belonging to Player Class

Code:
vector<shared_ptr<Weapon>> Loadout;
and I cannot insert them in the map using:

Code:
for (auto weapon : Loadout) {
	if (weapon->Disabled) {
		auto WeaponPtr = std::make_shared<Weapon>(weapon);
		DamageLog.insert(make_pair(10, WeaponPtr));
	}
}