https://bugs.llvm.org/show_bug.cgi?id=41876
Bug ID: 41876
Summary: std::hash should not accept std::basic_strings with
custom character traits
Product: libc++
Version: 8.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: m...@groundctl.com
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs