We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
[[nodiscard]]
1 parent 01540ec commit bdfe173Copy full SHA for bdfe173
libcxx/test/libcxx/utilities/function.objects/func.not.fn/not_fn.nttp.nodiscard.verify.cpp
@@ -18,4 +18,7 @@
18
void test() {
19
using F = std::true_type;
20
std::not_fn<F{}>(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
21
+
22
+ auto negated = std::not_fn<F{}>();
23
+ negated(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
24
}
0 commit comments