示例

int function(int &a, int &b){
a++;   
return b;
}

解决方案
如果不修改内置类型,那么通过值对其进行传递。

int function(int &a, int b){
a++;   
return b;
}