[libcxx-commits] [PATCH] D67900: [libc++] Use builtin type traits whenever possible

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Oct 20 20:42:55 PDT 2019


zoecarver marked 2 inline comments as done.
zoecarver added inline comments.


================
Comment at: libcxx/include/type_traits:758
+template <class _Tp>
+struct __libcpp_is_void : _BoolConstant<__is_void(_Tp)> { };
+
----------------
zoecarver wrote:
> CaseyCarter wrote:
> > This isn't equivalent: `__is_void(cv-void)` is `true`, but `__libcpp_is_void<cv-void>` is `false`.
> I'll look into this and submit a patch, thanks.
I see the issue, `std::is_void` functions the same way. I'll update the patch and pull `__libcpp_is_void ` out of the conditional block. 


================
Comment at: libcxx/include/type_traits:1165
+// Before clang 10, this builtin did not work for nullptr_t
+#if __has_keyword(__is_fundamental) && _LIBCPP_CLANG_VER > 900
+
----------------
zoecarver wrote:
> CaseyCarter wrote:
> > Should this be `>= 1000` instead of `> 900` to avoid catching e.g. 9.0.1, or has the bug been fixed on the Clang 9 branch also? (If so, the comment could be clarified.)
> When clang 9.0.1 branched? I submitted it a few weeks ago. I'll see if I can figure out what version this is in an update the condition/comment.
It doesn't look like clang 9.0.1 has been released yet so the fix will be in it. I'll update the comment. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67900/new/

https://reviews.llvm.org/D67900





More information about the libcxx-commits mailing list