[libcxx-commits] [PATCH] D126119: [libc++] Enable more warnings in the test suite
Joe Loser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat May 21 13:44:45 PDT 2022
jloser 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);
}
----------------
philnik wrote:
> 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.
Ah, got it. Thanks!
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