[llvm-bugs] [Bug 41876] New: std::hash should not accept std::basic_strings with custom character traits
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 14 10:11:30 PDT 2019
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: unassignedclangbugs at nondot.org
Reporter: marc at groundctl.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190514/85720ef7/attachment.html>
More information about the llvm-bugs
mailing list