---
name: "std::__detail::_Hashtable_traits"
section: "3cxx"
platform: "linux"
package: "libstdc++-10-doc"
version: "10.2.1-6"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/std::__detail::_Hashtable_traits"
---

# std::\_\_detail::\_Hashtable\_traits(3cxx)

## NAME

std::\_\_detail::\_Hashtable\_traits\< \_Cache\_hash\_code, \_Constant\_iterators, \_Unique\_keys \>

## SYNOPSIS

### Public Types

using **\_\_constant\_iterators** = **\_\_bool\_constant**\< \_Constant\_iterators \>\
 using **\_\_hash\_cached** = **\_\_bool\_constant**\< \_Cache\_hash\_code \>\
 using **\_\_unique\_keys** = **\_\_bool\_constant**\< \_Unique\_keys \>\

## Detailed Description

### template\<bool \_Cache\_hash\_code, bool \_Constant\_iterators, bool \_Unique\_keys\>

struct std::\_\_detail::\_Hashtable\_traits\< \_Cache\_hash\_code, \_Constant\_iterators, \_Unique\_keys \>" struct \_Hashtable\_traits

Important traits for hash tables.

**Template Parameters**

*\_Cache\_hash\_code* Boolean value. True if the value of the hash function is stored along with the value. This is a time-space tradeoff. Storing it may improve lookup speed by reducing the number of times we need to call the \_Hash or \_Equal functors.\
 *\_Constant\_iterators* Boolean value. True if iterator and const\_iterator are both constant iterator types. This is true for unordered\_set and unordered\_multiset, false for unordered\_map and unordered\_multimap.\
 *\_Unique\_keys* Boolean value. True if the return value of \_Hashtable::count(k) is always at most one, false if it may be an arbitrary number. This is true for unordered\_set and unordered\_map, false for unordered\_multiset and unordered\_multimap.

Definition at line 199 of file hashtable\_policy.h.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
