# tsl

# template < class Key, class Hash = std::hash < Key >, class KeyEqual = std::equal_to < Key >, class Allocator = std::allocator < Key >, class ValueTypeContainer = std::deque < Key, Allocator >, class IndexType = std::uint_least32_t >

# class ordered_set

Library:
Package:
Header: Poco/ordered_set.h

## Member Summary

Member Functions: 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, key_eq, load_factor, max_bucket_count, max_load_factor, max_size, mutable_iterator, nth, operator =, pop_back, rbegin, rcbegin, rcend, rehash, release, rend, reserve, serialize, shrink_to_fit, size, swap, unordered_erase, values_container

## Types Aliases

### allocator_type

using allocator_type = typename ht::allocator_type;

### const_iterator

using const_iterator = typename ht::const_iterator;

### const_pointer

using const_pointer = typename ht::const_pointer;

### const_reference

using const_reference = typename ht::const_reference;

### const_reverse_iterator

using const_reverse_iterator = typename ht::const_reverse_iterator;

### difference_type

using difference_type = typename ht::difference_type;

### hasher

using hasher = typename ht::hasher;

### iterator

using iterator = typename ht::iterator;

### key_equal

using key_equal = typename ht::key_equal;

### key_type

using key_type = typename ht::key_type;

### pointer

using pointer = typename ht::pointer;

### reference

using reference = typename ht::reference;

### reverse_iterator

using reverse_iterator = typename ht::reverse_iterator;

### size_type

using size_type = typename ht::size_type;

### value_type

using value_type = typename ht::value_type;

### values_container_type

using values_container_type = typename ht::values_container_type;

## Constructors

### ordered_set

ordered_set();

### ordered_set

explicit ordered_set(
const Allocator & alloc
);

### ordered_set

ordered_set(
size_type bucket_count,
const Allocator & alloc
);

### ordered_set

ordered_set(
size_type bucket_count,
const Hash & hash,
const Allocator & alloc
);

### ordered_set

ordered_set(
std::initializer_list < value_type > init,
size_type bucket_count,
const Allocator & alloc
);

### ordered_set

explicit ordered_set(
size_type bucket_count,
const Hash & hash = Hash (),
const KeyEqual & equal = KeyEqual (),
const Allocator & alloc = Allocator ()
);

### ordered_set

template < class InputIt > ordered_set(
InputIt first,
InputIt last,
size_type bucket_count,
const Allocator & alloc
);

### ordered_set

ordered_set(
std::initializer_list < value_type > init,
size_type bucket_count,
const Hash & hash,
const Allocator & alloc
);

### ordered_set

template < class InputIt > ordered_set(
InputIt first,
InputIt last,
size_type bucket_count,
const Hash & hash,
const Allocator & alloc
);

### ordered_set

ordered_set(
std::initializer_list < value_type > init,
size_type bucket_count = ht::DEFAULT_INIT_BUCKETS_SIZE,
const Hash & hash = Hash (),
const KeyEqual & equal = KeyEqual (),
const Allocator & alloc = Allocator ()
);

### ordered_set

template < class InputIt > ordered_set(
InputIt first,
InputIt last,
size_type bucket_count = ht::DEFAULT_INIT_BUCKETS_SIZE,
const Hash & hash = Hash (),
const KeyEqual & equal = KeyEqual (),
const Allocator & alloc = Allocator ()
);

## Member Functions

### 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 < tsl::detail_ordered_hash::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

bool contains(
const Key & key
) const;

### contains

bool contains(
const Key & key,
std::size_t precalculated_hash
) const;

### contains

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > bool contains(
const K & key
) const;

### contains

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > bool contains(
const K & key,
std::size_t precalculated_hash
) const;

### count

size_type count(
const Key & key
) const;

### count

size_type count(
const Key & key,
std::size_t precalculated_hash
) const;

### count

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > size_type count(
const K & key
) const;

### count

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > size_type count(
const K & key,
std::size_t precalculated_hash
) const;

### data

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

### deserialize

template < class Deserializer > static ordered_set deserialize(
Deserializer & deserializer,
bool hash_compatible = false
);

### 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

std::pair < iterator, iterator > equal_range(
const Key & key
);

### equal_range

std::pair < iterator, iterator > equal_range(
const Key & key,
std::size_t precalculated_hash
);

### equal_range

std::pair < const_iterator, const_iterator > equal_range(
const Key & key
) const;

### equal_range

std::pair < const_iterator, const_iterator > equal_range(
const Key & key,
std::size_t precalculated_hash
) const;

### equal_range

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > std::pair < iterator, iterator > equal_range(
const K & key
);

### equal_range

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > std::pair < iterator, iterator > equal_range(
const K & key,
std::size_t precalculated_hash
);

### equal_range

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > std::pair < const_iterator, const_iterator > equal_range(
const K & key
) const;

### equal_range

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > std::pair < const_iterator, const_iterator > equal_range(
const K & key,
std::size_t precalculated_hash
) const;

### erase

iterator erase(
iterator pos
);

### erase

iterator erase(
const_iterator pos
);

### erase

iterator erase(
const_iterator first,
const_iterator last
);

### erase

size_type erase(
const key_type & key
);

### erase

size_type erase(
const key_type & key,
std::size_t precalculated_hash
);

### erase

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > size_type erase(
const K & key
);

### erase

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > size_type erase(
const K & key,
std::size_t precalculated_hash
);

### erase_if

template < class Predicate > friend size_type erase_if(
ordered_set & set,
Predicate pred
);

### find

iterator find(
const Key & key
);

### find

iterator find(
const Key & key,
std::size_t precalculated_hash
);

### find

const_iterator find(
const Key & key
) const;

### find

const_iterator find(
const Key & key,
std::size_t precalculated_hash
) const;

### find

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > iterator find(
const K & key
);

### find

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > iterator find(
const K & key,
std::size_t precalculated_hash
);

### find

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > const_iterator find(
const K & key
) const;

### find

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > const_iterator find(
const K & key,
std::size_t precalculated_hash
) const;

### front

const_reference front() const;

### get_allocator

allocator_type get_allocator() const;

### hash_function

hasher hash_function() const;

### insert

std::pair < iterator, bool > insert(
const value_type & value
);

### insert

std::pair < iterator, bool > insert(
value_type && value
);

### insert

iterator insert(
const_iterator hint,
const value_type & value
);

### insert

iterator insert(
const_iterator hint,
value_type && value
);

### insert

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

### insert

void insert(
std::initializer_list < value_type > ilist
);

### insert_at_position

std::pair < iterator, bool > insert_at_position(
const_iterator pos,
const value_type & value
);

### insert_at_position

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

### 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_set & operator = (
std::initializer_list < value_type > ilist
);

### 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_set & other
);

### unordered_erase

iterator unordered_erase(
iterator pos
);

### unordered_erase

iterator unordered_erase(
const_iterator pos
);

### unordered_erase

size_type unordered_erase(
const key_type & key
);

### unordered_erase

size_type unordered_erase(
const key_type & key,
std::size_t precalculated_hash
);

### unordered_erase

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > size_type unordered_erase(
const K & key
);

### unordered_erase

template < class K, class KE = KeyEqual, typename std::enable_if < has_is_transparent < KE >::value >::type * = nullptr > size_type unordered_erase(
const K & key,
std::size_t precalculated_hash
);

### values_container

const values_container_type & values_container() const noexcept;