[libcxx-commits] [PATCH] D127606: [libc++] Simplify __config a bit
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jun 12 14:58:00 PDT 2022
Mordante added a comment.
In general I like the approach. I want to have a closer look when the CI is green.
================
Comment at: libcxx/include/__config:209
+#if !defined(_LIBCPP_COMPILER_CLANG_BASED) && __cplusplus < 201103L
+# error "libc++ does not support compilers other than Clang in C++03. Please enable C++11."
#endif
----------------
One of the things bothering about this file is the lack-of overview what indention level parts have.
After processing this patch would it make sense to format this file?
Then all `# foo` parts have the proper indention.
================
Comment at: libcxx/include/__config:408
-#if __cplusplus < 201103L
typedef __char16_t char16_t;
typedef __char32_t char32_t;
----------------
nit: maybe use `using` instead?
================
Comment at: libcxx/include/__config:414
-#if __cplusplus < 201103L
typedef __char16_t char16_t;
----------------
Can this be really removed?
================
Comment at: libcxx/include/__config:908
-// Try to find out if RTTI is disabled.
-#if defined(_LIBCPP_COMPILER_CLANG_BASED) && !__has_feature(cxx_rtti)
-# define _LIBCPP_NO_RTTI
-#elif defined(__GNUC__) && !defined(__GXX_RTTI)
-# define _LIBCPP_NO_RTTI
-#elif defined(_LIBCPP_COMPILER_MSVC) && !defined(_CPPRTTI)
+#if !defined(__cpp_rtti) || __cpp_rtti < 199711L
# define _LIBCPP_NO_RTTI
----------------
This looks odd, `199711L` refers to C++98. When RTTI is disable is it a "random" value or always `0L`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127606/new/
https://reviews.llvm.org/D127606
More information about the libcxx-commits
mailing list