[libcxx-commits] [PATCH] D143447: [libc++] Implement P1328R1 constexpr std::type_info::operator==

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 7 17:03:07 PST 2023


ldionne added a comment.

Sorry, I never published my reply to the reviewer's comments.



================
Comment at: libcxx/test/std/language.support/support.rtti/type.info/type_info.equal.pass.cpp:31-34
+static constexpr Derived D;
+constexpr const Base &get_it() {
+  return D;
+}
----------------
aaron.ballman wrote:
> These are unused in the test.
Ahhh, copy-paste. Thanks!


================
Comment at: libcxx/test/std/language.support/support.rtti/type.info/type_info.equal.pass.cpp:41
+    std::type_info const& t2 = typeid(long);
+    assert(t1 == t1);
+    assert(t2 == t2);
----------------
aaron.ballman wrote:
> I'm very unfamiliar with libc++ testing patterns, but does something ensure that the `assert` macro actually expands to test things even in `NDEBUG` builds?
We don't run the test suite with `NDEBUG` unless I missed something. TBH this is how all libc++ tests have always been written since its inception, but I do agree this is kinda weird.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143447



More information about the libcxx-commits mailing list