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.
1 parent 15d5458 commit a7bc728Copy full SHA for a7bc728
libcxx/test/libcxx/diagnostics/functional.nodiscard.verify.cpp
@@ -35,7 +35,9 @@ void test() {
35
36
// Identity
37
38
+#if TEST_STD_VER >= 20
39
std::identity{}(i); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
40
+#endif
41
42
// Partial function application
43
@@ -51,6 +53,7 @@ void test() {
51
53
std::bind<float>([](int a) { return a; }, 94);
52
54
55
// Reference wrappers
56
+
57
std::reference_wrapper<int> rw{i};
58
rw.get(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
59
std::function<int(int)> vf;
0 commit comments