This patch ensures that std::hash<basic_string> uses char_traits<_CharT> and not a template parameter _Trait. Resolves 41876.
Details
Diff Detail
Event Timeline
Other than the skimpy traits implementation, this looks good to me.
test/std/strings/basic.string.hash/char_type_hash.fail.cpp | ||
---|---|---|
21 | You should put a full traits implementation in here; just to be sure that some other failure isn't masking the one that you want. Just copy the default one from <__string>. | |
30 | You can use expected-error-re to avoid having to spell out the entire error message. |
test/std/strings/basic.string.hash/char_type_hash.fail.cpp | ||
---|---|---|
25 | We don't usually do using namespace std; in our tests. |
test/std/strings/basic.string.hash/char_type_hash.fail.cpp | ||
---|---|---|
25 | Good to know. I will remove it. |
You should put a full traits implementation in here; just to be sure that some other failure isn't masking the one that you want. Just copy the default one from <__string>.