libc++ provides a specialization of std::hash that works for arbitrary instantiations of std::basic_string. This can produce incorrect behavior for basic_string instantiations with custom character traits that override equality (e.g. traits for case-insensitive comparison). Since the standard only requires that hash for for the typedefed instantiations (e.g. hash<string>, hash<wstring>, etc), libc++ should not support hashing basic_strings with custom character traits to avoid incorrect behavior.
Good catch. My fix is up for review here: https://reviews.llvm.org/D61954
Fixed in revision 361201