Mark most of the hash functions provided by libc++ as noexcept; the exceptions being optional and variant.
Tests to ensure this.
There's still some investigation to be done on unique_ptr and fancy pointer support, but that can come later.
Paths
| Differential D31234
Implement P0599 - noexcept for hash functions ClosedPublic Authored by mclow.lists on Mar 21 2017, 10:38 PM.
Details
Summary Mark most of the hash functions provided by libc++ as noexcept; the exceptions being optional and variant. There's still some investigation to be done on unique_ptr and fancy pointer support, but that can come later.
Diff Detail Event TimelineComment Actions Add missing include to the thread::id test and mark unique_ptrs hash as not noexcept. Comment Actions LGTM. Although it would be useful to test that hash<variant<...>> and hash<optional<T>> do not have noexcept call operators. Alternatively should we make hash conditionally noexcept for variant and optional? This revision is now accepted and ready to land.Mar 22 2017, 5:38 PM
Revision Contents
Diff 92645 include/memory
include/optional
include/thread
include/variant
test/std/containers/sequences/vector.bool/vector_bool.pass.cpp
test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
test/std/strings/basic.string.hash/strings.pass.cpp
test/std/strings/string.view/string.view.hash/string_view.pass.cpp
test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp
test/std/utilities/function.objects/unord.hash/enum.pass.cpp
test/std/utilities/function.objects/unord.hash/floating.pass.cpp
test/std/utilities/function.objects/unord.hash/integral.pass.cpp
test/std/utilities/function.objects/unord.hash/pointer.pass.cpp
test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
test/std/utilities/variant/variant.hash/hash.pass.cpp
|