[#bsl-hashtable] = xref:bsl.adoc[bsl]::hashtable :relfileprefix: ../ :mrdocs: Internal STLPort hash table used to implement legacy hash containers. == Synopsis Declared in `<bslstp_hashtable.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All> class hashtable; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:bsl/hashtable/_Iterator_category.adoc[`_Iterator_category`] | Iterator category tag for this container's iterators. | xref:bsl/hashtable/__const_val_traits.adoc[`__const_val_traits`] | Iterator traits for `const` access to stored values. | xref:bsl/hashtable/__nonconst_val_traits.adoc[`__nonconst_val_traits`] | Iterator traits for modifiable access to stored values. | xref:bsl/hashtable/allocator_type.adoc[`allocator_type`] | Allocator type used by this table. | xref:bsl/hashtable/const_iterator.adoc[`const_iterator`] | Iterator providing non‐modifiable access to elements. | xref:bsl/hashtable/const_pointer.adoc[`const_pointer`] | Pointer to a non‐modifiable value. | xref:bsl/hashtable/const_reference.adoc[`const_reference`] | Reference to a non‐modifiable value. | xref:bsl/hashtable/difference_type.adoc[`difference_type`] | Signed integral type used for iterator differences. | xref:bsl/hashtable/hasher.adoc[`hasher`] | Hash functor type. | xref:bsl/hashtable/iterator.adoc[`iterator`] | Iterator providing modifiable access to elements. | xref:bsl/hashtable/key_equal.adoc[`key_equal`] | Key‐equality functor type. | xref:bsl/hashtable/key_type.adoc[`key_type`] | Key type used to locate elements. | xref:bsl/hashtable/pointer.adoc[`pointer`] | Pointer to a modifiable value. | xref:bsl/hashtable/reference.adoc[`reference`] | Reference to a modifiable value. | xref:bsl/hashtable/size_type.adoc[`size_type`] | Unsigned integral type used for sizes. | xref:bsl/hashtable/value_type.adoc[`value_type`] | Value type stored in the table. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/hashtable/2constructor-0a.adoc[`hashtable`] [.small]#[constructor]# | Constructors | xref:bsl/hashtable/2destructor.adoc[`~hashtable`] [.small]#[destructor]# | Destroy this hash table and release all stored elements. | xref:bsl/hashtable/operator_assign.adoc[`operator=`] | Assign to this table the value of the specified `__ht`. | xref:bsl/hashtable/_M_insert.adoc[`_M_insert`] | Insert the specified value, returning a reference to the stored element. | xref:bsl/hashtable/begin-0a.adoc[`begin`] | `begin` overloads | xref:bsl/hashtable/bucket_count.adoc[`bucket_count`] | Return the number of buckets in this table. | xref:bsl/hashtable/clear.adoc[`clear`] | Remove all elements from this table. | xref:bsl/hashtable/count.adoc[`count`] | Return the number of elements with the specified `__key`. | xref:bsl/hashtable/elems_in_bucket.adoc[`elems_in_bucket`] | Return the number of elements in the specified bucket. | xref:bsl/hashtable/empty.adoc[`empty`] | Return `true` if this table contains no elements. | xref:bsl/hashtable/end-0b.adoc[`end`] | `end` overloads | xref:bsl/hashtable/equal_range-0b.adoc[`equal_range`] | `equal_range` overloads | xref:bsl/hashtable/erase-09.adoc[`erase`] | `erase` overloads | xref:bsl/hashtable/find-00.adoc[`find`] | `find` overloads | xref:bsl/hashtable/find_or_insert.adoc[`find_or_insert`] | Return a reference to an existing element equal to `__obj`, inserting `__obj` if no such element exists. | xref:bsl/hashtable/get_allocator.adoc[`get_allocator`] | Return the allocator used by this table. | xref:bsl/hashtable/hash_funct.adoc[`hash_funct`] | Return the hash functor used by this table. | xref:bsl/hashtable/insert_equal-0f.adoc[`insert_equal`] | `insert_equal` overloads | xref:bsl/hashtable/insert_equal_noresize.adoc[`insert_equal_noresize`] | Insert the specified `__obj` without resizing the bucket vector. | xref:bsl/hashtable/insert_unique-09.adoc[`insert_unique`] | `insert_unique` overloads | xref:bsl/hashtable/insert_unique_noresize.adoc[`insert_unique_noresize`] | Insert the specified `__obj` without resizing the bucket vector. | xref:bsl/hashtable/key_eq.adoc[`key_eq`] | Return the key‐equality functor used by this table. | xref:bsl/hashtable/max_bucket_count.adoc[`max_bucket_count`] | Return the maximum number of buckets this table can use. | xref:bsl/hashtable/max_size.adoc[`max_size`] | Return an upper bound on the number of elements this table can hold. | xref:bsl/hashtable/resize.adoc[`resize`] | Rebuild the bucket vector using a size suggested by `__num_elements_hint`. | xref:bsl/hashtable/size.adoc[`size`] | Return the number of elements in this table. | xref:bsl/hashtable/swap.adoc[`swap`] | Exchange the contents of this table with those of the specified `__ht`. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/hashtable/_M_equal.adoc[`_M_equal`] | Return `true` if the specified tables contain the same elements. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:bsl/_Ht_iterator.adoc[bsl::_Ht_iterator]` | | `xref:bsl/_Hashtable_iterator.adoc[bsl::_Hashtable_iterator]` | | `bsl::hashtable::QuickSwap` | |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/operator_not_eq-07e.adoc[`operator!=`] | Return `true` if the specified hash tables do not contain the same elements. | xref:bsl/operator_eq-0df.adoc[`operator==`] | Return `true` if the specified hash tables contain the same elements. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#