aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-05-04 15:35:25 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-05-04 15:35:25 +0100
commitfe6fb0d1590237c67b75342dc41b7ffdbdcccf25 (patch)
treedbd474a3076c23ef0d047655b62b3ff91992dbd0 /gcc
parent34d9c2c269c553a1f15813f6d7624e8aca87adef (diff)
downloadgcc-fe6fb0d1590237c67b75342dc41b7ffdbdcccf25.zip
gcc-fe6fb0d1590237c67b75342dc41b7ffdbdcccf25.tar.gz
gcc-fe6fb0d1590237c67b75342dc41b7ffdbdcccf25.tar.bz2
Fix std::hash<std::error_condition>
The hash value should be based on the identity (i.e. address) of the error_category member, not its object representation (i.e. underlying bytes). * include/std/system_error (error_code): Remove friend declaration for hash<error_code>. (hash<error_code>::operator()): Use public member functions to access value and category. (hash<error_condition>::operator()): Use address of category, not its object representation. * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()): Use public member functions to access value and category. * testsuite/19_diagnostics/error_condition/hash.cc: New test. From-SVN: r270872
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions