Commit 4910eabb authored by Yuta Kitamura's avatar Yuta Kitamura Committed by Commit Bot

WTF::HashSet/HashMap: Clarify the restriction on integer keys.

This patch only touches comments. No code change.

Change-Id: Ibc823deb7cfe35dfed400566767e1791ac78e48b
Reviewed-on: https://chromium-review.googlesource.com/564876Reviewed-by: default avatarTaiju Tsuiki <tzik@chromium.org>
Commit-Queue: Yuta Kitamura <yutak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485202}
parent 7a1f2e12
......@@ -39,8 +39,9 @@ struct KeyValuePairKeyExtractor {
};
// Note: empty or deleted key values are not allowed, using them may lead to
// undefined behavior. For pointer keys this means that null pointers are not
// allowed unless you supply custom key traits.
// undefined behavior. For pointer keys this means that null pointers are not
// allowed; for integer keys 0 or -1 can't be used as a key. This restriction
// can be lifted if you supply custom key traits.
template <typename KeyArg,
typename MappedArg,
typename HashArg = typename DefaultHash<KeyArg>::Hash,
......
......@@ -30,8 +30,9 @@ namespace WTF {
struct IdentityExtractor;
// Note: empty or deleted values are not allowed, using them may lead to
// undefined behavior. For pointer valuess this means that null pointers are
// not allowed unless you supply custom traits.
// undefined behavior. For pointer keys this means that null pointers are not
// allowed; for integer keys 0 or -1 can't be used as a key. This restriction
// can be lifted if you supply custom key traits.
template <typename ValueArg,
typename HashArg = typename DefaultHash<ValueArg>::Hash,
typename TraitsArg = HashTraits<ValueArg>,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment