decltype 运算符与
type*
type&
type
int* i; decltype(*i) l; // int& l; int o; // decltype(???) o;
我只是想知道是否有办法做到这一点,我是否需要图书馆或类似的东西?
您可以使用std::remove_reference