注意:先要提前安装好 boost 库
#include <iostream>
#include <boost/type_index.hpp>
int main() {
using boost::typeindex::type_id_with_cvr;
auto x = 100;
std::cout << type_id_with_cvr<decltype(x)>().pretty_name() << std::endl;
return 0;
}
标签:std,main,判断,cout,auto,类型,include,boost
From: https://www.cnblogs.com/hacker-dvd/p/17381943.html