[map] Add INVALID_KEY and INVALID_VALUE

This commit is contained in:
Behdad Esfahbod 2021-11-02 17:56:11 -06:00
parent 540f19b6fe
commit b1cd0dce8e
1 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,9 @@ template <typename K, typename V,
V vINVALID = hb_is_pointer (V) ? 0 : std::is_signed<V>::value ? hb_int_min (V) : (V) -1>
struct hb_hashmap_t
{
static constexpr K INVALID_KEY = kINVALID;
static constexpr V INVALID_VALUE = vINVALID;
hb_hashmap_t () { init (); }
~hb_hashmap_t () { fini (); }