C++11关键字decltype
1、作用
选择并返回操作数的数据类型
2、使用
int A(); int main(void) { int tempA = 2; /*1.testA为int*/ decltype(tempA) testA; /*2.testB为int,并不调用A()*/ decltype(getSize()) testB; return 0; }
长风破浪会有时,直挂云帆济沧海!
可通过下方链接找到博主
https://www.cnblogs.com/judes/p/10875138.html