File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
libcxx/test/libcxx/diagnostics Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -121,20 +121,11 @@ void test_members() {
121121#endif
122122}
123123
124- class TestHash {
125- public:
126- template <typename CharT>
127- void operator ()() {
128- using StringViewT = std::basic_string_view<CharT>;
129- std::hash<StringViewT> hash;
130- // expected-warning@+1 4-5 {{ignoring return value of function declared with 'nodiscard' attribute}}
131- hash (StringViewT{});
132- }
133- };
134-
135124void test_nonmembers () {
136125 // std::hash<>
137- types::for_each (types::character_types (), TestHash{});
126+ // expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
127+ std::hash<std::string_view> hash;
128+ hash ();
138129
139130#if TEST_STD_VER >= 14
140131 // string_view literals
You can’t perform that action at this time.
0 commit comments