[libcxx-commits] [PATCH] D127978: [libc++][test] Replaces TEST_IS_CONSTANT_EVALUATED.
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 17 12:07:36 PDT 2022
philnik accepted this revision as: philnik.
philnik added a comment.
LGTM % nits.
================
Comment at: libcxx/test/support/constant_evaluated.h:18
+namespace TestedCppVersion {
+enum Enum {
+ Cpp14,
----------------
Can't this be an anonymous enum? Or is this an extension?
================
Comment at: libcxx/test/support/constant_evaluated.h:27-31
+#if defined(__cpp_lib_is_constant_evaluated) && __cpp_lib_is_constant_evaluated >= 201811L
+# define IS_CONSTANT_EVALUATED std::is_constant_evaluated()
+#elif TEST_HAS_BUILTIN(__builtin_is_constant_evaluated)
+# define IS_CONSTANT_EVALUATED __builtin_is_constant_evaluated()
+#endif
----------------
I think I'd rather have this in it's own function instead of a macro.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127978/new/
https://reviews.llvm.org/D127978
More information about the libcxx-commits
mailing list