[libcxx-commits] [PATCH] D113906: [libc++] [test] Add "robust_re_difference_type.compile.pass.cpp" for all the algorithms.
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 15 09:20:11 PST 2021
philnik added inline comments.
================
Comment at: libcxx/test/std/algorithms/robust_against_adl.compile.pass.cpp:2
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
----------------
Since these are new tests maybe clang-format them to LLVM style?
================
Comment at: libcxx/test/std/algorithms/robust_against_adl.compile.pass.cpp:22
+template<class>
+struct Intable {
+ TEST_CONSTEXPR operator int() const { return 1; }
----------------
I think a better name would be `ConvertibleToInt`.
================
Comment at: libcxx/test/std/algorithms/robust_re_difference_type.compile.pass.cpp:28
+#define NOT_CONSTEVAL(...) __VA_ARGS__
+#endif
+
----------------
In D110598 I define a `TEST_IS_CONSTANT_EVALUATED`. The `TEST_IS_CONSTANT_EVALUATED` is more verbose but I think it is the more general approach. And maybe feature test with `__cpp_lib_is_constant_evaluated` instead of assuming it in C++20 if you still want to go with `NOT_CONSTEVAL`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113906/new/
https://reviews.llvm.org/D113906
More information about the libcxx-commits
mailing list