Skip to content

实现 is_integral 时的错误 #97

@liginity

Description

@liginity

docs/cpp/modern_cpp/type_traits.md 展示如何实现 is_integral 模板时,使用了 std::remove_cv 模板,这是不应该使用的。对于 intint& 两个类型,std::is_integral<T>::value 分别是真和假。

见 godbolt 例子

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions