c++: Tweak for -Wpessimizing-move in templates [PR89780]