Added IsSameV as a convenience variable and used it where convenient.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/utils/CPP/TypeTraits.h | ||
---|---|---|
44 | Maybe we could have: template <typename Type> struct IsIntegral { using NoCV = RemoveCVType<Type>; static constexpr bool Value = IsSame<char, NoCV>::Value || ... It also might make sense to make an std::is_same_v so we don't need to keep adding ::Value | |
60–61 | This needs RemoveCV too. As a nit, this and the IsFloatingPointType shouldn't have Type at the end because that sounds like it would be analogous to the type definitions which end in _t like std::remove_cv_t. Although these templates have a Value not Type I think it is still better to leave it off. Especially because the type_traits version of these are just be called std::is_pointer and std::is_floating_point |
Using inline on variables is a C++ 17 feature. Does static make sense until then? I would expect this var to get optimized out anyway.