Add HashTable::reserve() (for preallocated hashed/sparse_hashed dictionaries)

This commit is contained in:
Azat Khuzhin 2020-10-03 22:55:02 +03:00
parent 35165c8ea4
commit f4f79aa84a

View File

@ -850,6 +850,11 @@ protected:
public:
void reserve(size_t num_elements)
{
resize(num_elements);
}
/// Insert a value. In the case of any more complex values, it is better to use the `emplace` function.
std::pair<LookupResult, bool> ALWAYS_INLINE insert(const value_type & x)
{