(1)多用在类模板中
#include <iostream>
using namespace std;
template <typename T>
auto AutoFunctionFromParameter(T parameter) -> decltype(parameter) {
return parameter;
}
int main() {
auto value = AutoFunctionFromParameter(2);
cout << value << endl;
return 0;
}