[libcxx-commits] [PATCH] D98720: [libc++] Consistent style on _LIBCPP_CLANG_VER tests in <type_traits>
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 16 09:36:23 PDT 2021
Quuxplusone marked an inline comment as done.
Quuxplusone added inline comments.
Comment at: libcxx/include/type_traits:1132
-// In clang 9 and lower, this builtin did not work for nullptr_t. Additionally, in C++03 mode,
-// nullptr isn't defined by the compiler so, this builtin won't work.
-#if __has_keyword(__is_fundamental) && _LIBCPP_CLANG_VER > 900 && !defined(_LIBCPP_CXX03_LANG)
+// Before Clang 10, __is_fundamental didn't work for nullptr_t.
+// In C++03 nullptr_t is library-provided but must still count as "fundamental."
> Nit: I think this means we won't take this path on Clang 9.0.1 anymore (which is maybe OK).
Yeah, I saw that and decided that it was OK, since any difference would be observed merely as a compile-speed pessimization on Clang 9.x compilers. I value consistency-of-syntax more than... that. :)
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libcxx-commits