decltype使用
#include<thread>
#include<array>
#include<iostream>
#include<windows.h>
#include <thread>
using namespace std;
void a(int a)
{
cout << a << endl;
};
void b(int b)
{
cout << a << endl;
};
int main()
{
decltype(a) &a1=a; //函数引用,给一个decltype初始化别名
a1(10);
decltype(a) *a2=a; //函数指针,给一个decltype初始化别名
a2(100);
decltype(a) b; 函数,给一个decltype初始化别名
b(1000);
}