[libc-commits] [PATCH] D83980: [libc][NFC] Use RemoveCVType to implement IsIntegral.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Jul 16 17:13:58 PDT 2020
sivachandra marked an inline comment as done.
sivachandra added inline comments.
================
Comment at: libc/utils/CPP/TypeTraits.h:34
+template <typename T1, typename T2>
+constexpr bool IsSameV = IsSame<T1, T2>::Value;
----------------
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.
================
Comment at: libc/utils/CPP/TypeTraits.h:59-60
+
+template <typename T> struct IsPointerType : public FalseValue {};
+template <typename T> struct IsPointerType<T *> : public TrueValue {};
+
----------------
abrachet wrote:
> 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 `RemoveCV` here now. Will do the renaming in a different pass as obvious. It touches a whole bunch of places.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83980/new/
https://reviews.llvm.org/D83980
More information about the libc-commits
mailing list