You could make deal_damage()
take the index as an argument. Then when you queue the action you can bind the current index to the callable like this:
actionQueue.push_back(deal_damage.bind(index))
So when you do action.call()
it’ll pass the value that was the index at the time of queuing the action.
If that doesn’t work for some reason you can make an action an array (or sub-class) instead of just a callable, and the first element of the array would be the callable, the second is the arguments (index), and store the current index that way.