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 8962d8b commit f2913caCopy full SHA for f2913ca
libcxx/test/libcxx/diagnostics/string_view.nodiscard.verify.cpp
@@ -123,12 +123,14 @@ void test_members() {
123
124
void test_nonmembers() {
125
// std::hash<>
126
- // expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
+
127
std::hash<std::string_view> hash;
128
- hash();
+ // expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
129
+ hash(std::string_view{});
130
131
#if TEST_STD_VER >= 14
132
// string_view literals
133
134
using namespace std::string_view_literals;
135
136
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
0 commit comments