CSGuide
CSGuide copied to clipboard
实现 `is_integral` 时的错误
在 docs/cpp/modern_cpp/type_traits.md 展示如何实现 is_integral 模板时,使用了 std::remove_cv 模板,这是不应该使用的。对于 int 和 int& 两个类型,std::is_integral<T>::value 分别是真和假。
见 godbolt 例子。