[#bsl-hashtable]
= xref:bsl.adoc[bsl]::hashtable
:relfileprefix: ../
:mrdocs:

Internal STLPort hash table used to implement legacy hash containers&period;

== Synopsis

Declared in `&lt;bslstp&lowbar;hashtable&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class &lowbar;Val,
    class &lowbar;Key,
    class &lowbar;HF,
    class &lowbar;ExK,
    class &lowbar;EqK,
    class &lowbar;All&gt;
class hashtable;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:bsl/hashtable/_Iterator_category.adoc[`&lowbar;Iterator&lowbar;category`] 
| Iterator category tag for this container&apos;s iterators&period;
| xref:bsl/hashtable/__const_val_traits.adoc[`&lowbar;&lowbar;const&lowbar;val&lowbar;traits`] 
| Iterator traits for `const` access to stored values&period;
| xref:bsl/hashtable/__nonconst_val_traits.adoc[`&lowbar;&lowbar;nonconst&lowbar;val&lowbar;traits`] 
| Iterator traits for modifiable access to stored values&period;
| xref:bsl/hashtable/allocator_type.adoc[`allocator&lowbar;type`] 
| Allocator type used by this table&period;
| xref:bsl/hashtable/const_iterator.adoc[`const&lowbar;iterator`] 
| Iterator providing non&hyphen;modifiable access to elements&period;
| xref:bsl/hashtable/const_pointer.adoc[`const&lowbar;pointer`] 
| Pointer to a non&hyphen;modifiable value&period;
| xref:bsl/hashtable/const_reference.adoc[`const&lowbar;reference`] 
| Reference to a non&hyphen;modifiable value&period;
| xref:bsl/hashtable/difference_type.adoc[`difference&lowbar;type`] 
| Signed integral type used for iterator differences&period;
| xref:bsl/hashtable/hasher.adoc[`hasher`] 
| Hash functor type&period;
| xref:bsl/hashtable/iterator.adoc[`iterator`] 
| Iterator providing modifiable access to elements&period;
| xref:bsl/hashtable/key_equal.adoc[`key&lowbar;equal`] 
| Key&hyphen;equality functor type&period;
| xref:bsl/hashtable/key_type.adoc[`key&lowbar;type`] 
| Key type used to locate elements&period;
| xref:bsl/hashtable/pointer.adoc[`pointer`] 
| Pointer to a modifiable value&period;
| xref:bsl/hashtable/reference.adoc[`reference`] 
| Reference to a modifiable value&period;
| xref:bsl/hashtable/size_type.adoc[`size&lowbar;type`] 
| Unsigned integral type used for sizes&period;
| xref:bsl/hashtable/value_type.adoc[`value&lowbar;type`] 
| Value type stored in the table&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bsl/hashtable/2constructor-0a.adoc[`hashtable`]         [.small]#[constructor]#
| Constructors
| xref:bsl/hashtable/2destructor.adoc[`&#126;hashtable`] [.small]#[destructor]#
| Destroy this hash table and release all stored elements&period;
| xref:bsl/hashtable/operator_assign.adoc[`operator&equals;`] 
| Assign to this table the value of the specified `&lowbar;&lowbar;ht`&period;
| xref:bsl/hashtable/_M_insert.adoc[`&lowbar;M&lowbar;insert`] 
| Insert the specified value, returning a reference to the stored element&period;
| xref:bsl/hashtable/begin-0a.adoc[`begin`] 
| `begin` overloads
| xref:bsl/hashtable/bucket_count.adoc[`bucket&lowbar;count`] 
| Return the number of buckets in this table&period;
| xref:bsl/hashtable/clear.adoc[`clear`] 
| Remove all elements from this table&period;
| xref:bsl/hashtable/count.adoc[`count`] 
| Return the number of matching elements&period;
| xref:bsl/hashtable/elems_in_bucket.adoc[`elems&lowbar;in&lowbar;bucket`] 
| Return the number of elements in the specified bucket&period;
| xref:bsl/hashtable/empty.adoc[`empty`] 
| Return `true` if this table contains no elements&period;
| xref:bsl/hashtable/end-0b.adoc[`end`] 
| `end` overloads
| xref:bsl/hashtable/equal_range-0b.adoc[`equal&lowbar;range`] 
| `equal&lowbar;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&lowbar;or&lowbar;insert`] 
| Return a reference to an existing element equal to `&lowbar;&lowbar;obj`, inserting `&lowbar;&lowbar;obj` if no such element exists&period;
| xref:bsl/hashtable/get_allocator.adoc[`get&lowbar;allocator`] 
| Return the allocator used by this table&period;
| xref:bsl/hashtable/hash_funct.adoc[`hash&lowbar;funct`] 
| Return the hash functor used by this table&period;
| xref:bsl/hashtable/insert_equal-0f.adoc[`insert&lowbar;equal`] 
| `insert&lowbar;equal` overloads
| xref:bsl/hashtable/insert_equal_noresize.adoc[`insert&lowbar;equal&lowbar;noresize`] 
| Insert the specified `&lowbar;&lowbar;obj` without resizing the bucket vector&period;
| xref:bsl/hashtable/insert_unique-09.adoc[`insert&lowbar;unique`] 
| `insert&lowbar;unique` overloads
| xref:bsl/hashtable/insert_unique_noresize.adoc[`insert&lowbar;unique&lowbar;noresize`] 
| Insert the specified `&lowbar;&lowbar;obj` without resizing the bucket vector&period;
| xref:bsl/hashtable/key_eq.adoc[`key&lowbar;eq`] 
| Return the key&hyphen;equality functor used by this table&period;
| xref:bsl/hashtable/max_bucket_count.adoc[`max&lowbar;bucket&lowbar;count`] 
| Return the maximum number of buckets this table can use&period;
| xref:bsl/hashtable/max_size.adoc[`max&lowbar;size`] 
| Return an upper bound on the number of elements this table can hold&period;
| xref:bsl/hashtable/resize.adoc[`resize`] 
| Rebuild the bucket vector using a size suggested by `&lowbar;&lowbar;num&lowbar;elements&lowbar;hint`&period;
| xref:bsl/hashtable/size.adoc[`size`] 
| Return the number of elements in this table&period;
| xref:bsl/hashtable/swap.adoc[`swap`] 
| Exchange the contents of this table with those of the specified `&lowbar;&lowbar;ht`&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bsl/hashtable/_M_equal.adoc[`&lowbar;M&lowbar;equal`] 
| Return `true` if the specified tables contain the same elements&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:bsl/_Ht_iterator.adoc[bsl::&lowbar;Ht&lowbar;iterator]`
| Constness&hyphen;aware forward iterator over a hashtable of `&lowbar;Val`&period;
| `xref:bsl/_Hashtable_iterator.adoc[bsl::&lowbar;Hashtable&lowbar;iterator]`
| Forward&hyphen;iterator base holding a hashtable node and table pointer&period;
| `bsl::hashtable::QuickSwap`
| 
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bsl/operator_not_eq-07e.adoc[`operator!&equals;`]
| Return `true` if the specified hash tables do not contain the same elements&period;
| xref:bsl/operator_eq-0df.adoc[`operator&equals;&equals;`]
| Return `true` if the specified hash tables contain the same elements&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
