且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

std :: is_integer和std :: is_integral之间的区别?

更新时间:2023-11-28 20:36:52

std::is_integer<T>不存在.

话虽这么说,std::numeric_limits<T>::is_integer确实存在.

That being said, std::numeric_limits<T>::is_integer does exist.

我不知道std::numeric_limits<T>::is_integerstd::is_integral<T>之间的任何显着差异.后者的设计要晚得多,并且在C ++ 11中成为标准,而前者是在C ++ 98中引入的.

I'm not aware of any significant difference between std::numeric_limits<T>::is_integer and std::is_integral<T>. The latter was designed much later and became standard in C++11, whereas the former was introduced in C++98.