这里传了引用进去,为什么没有改变a和b的值

#include<iostream> using namespace std; template <typename type1> type1 swap(type1 a, type1 b) { a = b; cout << "函数模板"; return 0; } int main() { int a = 0; int b = 1; int& la = a; int& lb = b; ave(la, lb); cout << a << " " << b; system("pause"); return 0; }
按照我的理解,传入a和b的引用,相当于传入了它们的地址,在函数中通过改变它们的引用,来改变它们。