# tsl::detail_ordered_hash

# template < class ValueType, class KeySelect, class ValueSelect, class Hash, class KeyEqual, class Allocator, class ValueTypeContainer, class IndexType >

# class ordered_hash

Library:
Package:
Header: Poco/ordered_hash.h

## Inheritance

Direct Base Classes: Hash, KeyEqual

All Base Classes: Hash, KeyEqual

## Member Summary

Member Functions: at, back, begin, bucket_count, capacity, cbegin, cend, clear, contains, count, data, deserialize, emplace, emplace_at_position, emplace_hint, empty, end, equal_range, erase, erase_if, find, front, get_allocator, hash_function, insert, insert_at_position, insert_hint, insert_or_assign, key_eq, load_factor, max_bucket_count, max_load_factor, max_size, mutable_iterator, nth, operator =, operator [], pop_back, rbegin, rcbegin, rcend, rehash, release, rend, reserve, serialize, shrink_to_fit, size, swap, try_emplace, try_emplace_at_position, try_emplace_hint, unordered_erase, values_container

## Nested Classes

### class ordered_iterator

## Types Aliases

### allocator_type

using allocator_type = Allocator;

### const_iterator

using const_iterator = ordered_iterator < true >;

### const_pointer

using const_pointer = const value_type *;

### const_reference

using const_reference = const value_type &;

### const_reverse_iterator

using const_reverse_iterator = std::reverse_iterator < const_iterator >;

### difference_type

using difference_type = std::ptrdiff_t;

### hasher

using hasher = Hash;

### iterator

using iterator = ordered_iterator < false >;

### key_equal

using key_equal = KeyEqual;

### key_type

using key_type = typename KeySelect::key_type;

### pointer

using pointer = value_type *;

### reference

using reference = value_type &;

### reverse_iterator

using reverse_iterator = std::reverse_iterator < iterator >;

### size_type

using size_type = std::size_t;

### value_type

using value_type = ValueType;

### values_container_type

using values_container_type = ValueTypeContainer;

## Constructors

### ordered_hash

ordered_hash(
const ordered_hash & other
);

### ordered_hash

ordered_hash(
ordered_hash && other
) noexcept;

### ordered_hash

ordered_hash(
size_type bucket_count,
const Hash & hash,
const KeyEqual & equal,
const Allocator & alloc,
float max_load_factor
);

## Member Functions

### at

template < class K, class U = ValueSelect, typename std::enable_if < has_mapped_type < U >::value >::type * = nullptr > typename U::value_type & at(
const K & key
);

### at

template < class K, class U = ValueSelect, typename std::enable_if < has_mapped_type < U >::value >::type * = nullptr > typename U::value_type & at(
const K & key,
std::size_t hash
);

### at

template < class K, class U = ValueSelect, typename std::enable_if < has_mapped_type < U >::value >::type * = nullptr > const typename U::value_type & at(
const K & key
) const;

### at

template < class K, class U = ValueSelect, typename std::enable_if < has_mapped_type < U >::value >::type * = nullptr > const typename U::value_type & at(
const K & key,
std::size_t hash
) const;

### back

const_reference back() const;

### begin

iterator begin() noexcept;

### begin

const_iterator begin() const noexcept;

### bucket_count

size_type bucket_count() const;

### capacity

template < class U = values_container_type, typename std::enable_if < is_vector < U >::value >::type * = nullptr > size_type capacity() const noexcept;

### cbegin

const_iterator cbegin() const noexcept;

### cend

const_iterator cend() const noexcept;

### clear

void clear() noexcept;

### contains

template < class K > bool contains(
const K & key
) const;

### contains

template < class K > bool contains(
const K & key,
std::size_t hash
) const;

### count

template < class K > size_type count(
const K & key
) const;

### count

template < class K > size_type count(
const K & key,
std::size_t hash
) const;

### data

template < class U = values_container_type, typename std::enable_if < is_vector < U >::value >::type * = nullptr > const typename values_container_type::value_type * data() const noexcept;

### deserialize

template < class Deserializer > void deserialize(
Deserializer & deserializer,
bool hash_compatible
);

### emplace

template < class ... Args > std::pair < iterator, bool > emplace(
Args && ... args
);

### emplace_at_position

template < class ... Args > std::pair < iterator, bool > emplace_at_position(
const_iterator pos,
Args && ... args
);

### emplace_hint

template < class ... Args > iterator emplace_hint(
const_iterator hint,
Args && ... args
);

### empty

bool empty() const noexcept;

### end

iterator end() noexcept;

### end

const_iterator end() const noexcept;

### equal_range

template < class K > std::pair < iterator, iterator > equal_range(
const K & key
);

### equal_range

template < class K > std::pair < iterator, iterator > equal_range(
const K & key,
std::size_t hash
);

### equal_range

template < class K > std::pair < const_iterator, const_iterator > equal_range(
const K & key
) const;

### equal_range

template < class K > std::pair < const_iterator, const_iterator > equal_range(
const K & key,
std::size_t hash
) const;

### erase

iterator erase(
iterator pos
);

### erase

iterator erase(
const_iterator pos
);

### erase

iterator erase(
const_iterator first,
const_iterator last
);

### erase

template < class K > size_type erase(
const K & key
);

### erase

template < class K > size_type erase(
const K & key,
std::size_t hash
);

### erase_if

template < class Predicate > size_type erase_if(
Predicate & pred
);

### find

template < class K > iterator find(
const K & key
);

### find

template < class K > iterator find(
const K & key,
std::size_t hash
);

### find

template < class K > const_iterator find(
const K & key
) const;

### find

template < class K > const_iterator find(
const K & key,
std::size_t hash
) const;

### front

const_reference front() const;

### get_allocator

allocator_type get_allocator() const;

### hash_function

hasher hash_function() const;

### insert

template < typename P > std::pair < iterator, bool > insert(
P && value
);

### insert

template < class InputIt > void insert(
InputIt first,
InputIt last
);

### insert_at_position

template < typename P > std::pair < iterator, bool > insert_at_position(
const_iterator pos,
P && value
);

### insert_hint

template < typename P > iterator insert_hint(
const_iterator hint,
P && value
);

### insert_or_assign

template < class K, class M > std::pair < iterator, bool > insert_or_assign(
K && key,
M && value
);

### insert_or_assign

template < class K, class M > iterator insert_or_assign(
const_iterator hint,
K && key,
M && obj
);

### key_eq

key_equal key_eq() const;

### load_factor

float load_factor() const;

### max_bucket_count

size_type max_bucket_count() const;

### max_load_factor

float max_load_factor() const;

### max_load_factor

void max_load_factor(
float ml
);

### max_size

size_type max_size() const noexcept;

### mutable_iterator

iterator mutable_iterator(
const_iterator pos
);

### nth

iterator nth(
size_type index
);

### nth

const_iterator nth(
size_type index
) const;

### operator =

ordered_hash & operator = (
const ordered_hash & other
);

### operator =

ordered_hash & operator = (
ordered_hash && other
);

### operator []

template < class K, class U = ValueSelect, typename std::enable_if < has_mapped_type < U >::value >::type * = nullptr > typename U::value_type & operator[] (
K && key
);

### pop_back

void pop_back();

### rbegin

reverse_iterator rbegin() noexcept;

### rbegin

const_reverse_iterator rbegin() const noexcept;

### rcbegin

const_reverse_iterator rcbegin() const noexcept;

### rcend

const_reverse_iterator rcend() const noexcept;

### rehash

void rehash(
size_type count
);

### release

values_container_type release();

### rend

reverse_iterator rend() noexcept;

### rend

const_reverse_iterator rend() const noexcept;

### reserve

void reserve(
size_type count
);

### serialize

template < class Serializer > void serialize(
Serializer & serializer
) const;

### shrink_to_fit

void shrink_to_fit();

### size

size_type size() const noexcept;

### swap

void swap(
ordered_hash & other
);

### try_emplace

template < class K, class ... Args > std::pair < iterator, bool > try_emplace(
K && key,
Args && ... value_args
);

### try_emplace_at_position

template < class K, class ... Args > std::pair < iterator, bool > try_emplace_at_position(
const_iterator pos,
K && key,
Args && ... value_args
);

### try_emplace_hint

template < class K, class ... Args > iterator try_emplace_hint(
const_iterator hint,
K && key,
Args && ... args
);

### unordered_erase

iterator unordered_erase(
iterator pos
);

### unordered_erase

iterator unordered_erase(
const_iterator pos
);

### unordered_erase

template < class K > size_type unordered_erase(
const K & key
);

### unordered_erase

template < class K > size_type unordered_erase(
const K & key,
std::size_t hash
);

### values_container

const values_container_type & values_container() const noexcept;

## Variables

### DEFAULT_INIT_BUCKETS_SIZE

static const size_type DEFAULT_INIT_BUCKETS_SIZE = 0;

### DEFAULT_MAX_LOAD_FACTOR

static constexpr float DEFAULT_MAX_LOAD_FACTOR = 0.75f;