[libcxx-commits] [PATCH] D126119: [libc++] Enable more warnings in the test suite

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat May 21 13:39:05 PDT 2022


philnik marked an inline comment as done.
philnik added inline comments.


================
Comment at: libcxx/test/std/utilities/variant/variant.visit/visit_return_type.pass.cpp:242
     constexpr V v(42);
-    static_assert((std::visit<void>(obj, v), 42) == 42, "");
+    std::visit<void>(obj, v);
   }
----------------
jloser wrote:
> This, and below, no longer check the return value of `std::visit` call is the correct value. Isn't that more or less the whole point of this test?
Look closer :). This checks that `42 == 42`. This uses the `opertor,`. `std::visit` returns `void` in these cases.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126119



More information about the libcxx-commits mailing list