[libcxx-commits] [libcxx] [libcxx][test] Silence nodiscard warnings for `std::expected` (PR #119174)
Stephan T. Lavavej via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Dec 8 23:27:22 PST 2024
================
@@ -237,25 +237,25 @@ constexpr void test_sfinae() {
return std::expected<int, int>();
};
- e1.transform(never_called);
- std::move(e1).transform(never_called);
- ce1.and_then(never_called);
- std::move(ce1).transform(never_called);
+ (void)e1.transform(never_called);
+ (void)std::move(e1).transform(never_called);
+ (void)ce1.and_then(never_called);
+ (void)std::move(ce1).transform(never_called);
----------------
StephanTLavavej wrote:
The `and_then` here looks like a copy-paste mistake. I could change this to `transform` if anyone wants.
https://github.com/llvm/llvm-project/pull/119174
More information about the libcxx-commits
mailing list