两个一样的类型会返回true bool isInt = std::is_same<int, int>::value; //为true
std::cout << std::is_same<int, int32_t>::value << ' '; // true std::cout << std::is_same<int, int64_t>::value << ' '; // false std::cout << std::is_same<float, int32_t>::value << ' '; // false std::cout << std::is_same<int, int>::value << " "; // true std::cout << std::is_same<int, unsigned int>::value << " "; // false std::cout << std::is_same<int, signed int>::value << " "; // true std::cout << std::is_same<char, char>::value << " "; // true std::cout << std::is_same<char, unsigned char>::value << " "; // false std::cout << std::is_same<char, signed char>::value << " "; // false