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 2e535e4 commit 5f2d335Copy full SHA for 5f2d335
libcxx/test/libcxx/language.support/nodiscard.verify.cpp
@@ -117,11 +117,13 @@ void test() {
117
std::current_exception();
118
}
119
120
+#if TEST_STD_VER >= 11
121
{ // <initializer_list>
122
std::initializer_list<int> il{94, 82, 49};
123
124
il.size(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
125
il.begin(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
126
il.end(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
127
128
+#endif
129
0 commit comments