My guess...
The list returned from MoveItemToCorpse is a temporary since it isn't being assigned to anything, and a temporary can't bind to the non-const reference that merge takes as a parameter.
To fix it, assign the temporary to a local variable and pass that to merge.
I'd also guess that Visual Studio may be warning about a non-standard extension there, but it's lost in the sea of other warnings in the project. It may also only show up at warning level 4. The error may also be different in debug versus release since that might change any elided copies from the return.
|