xtd 0.2.0
Loading...
Searching...
No Matches

◆ sorted_dictionary

template<typename key_t , typename value_t >
using xtd::collections::generic::sorted_dictionary = typedef std::map<key_t, value_t, helpers::comparer<key_t>, helpers::allocator<std::pair<const key_t, value_t> >>

Represents a collection of key/value pairs that are sorted on the key.

Definition
template<typename key_t, typename value_t>
using sorted_dictionary = std::map<key_t, value_t, helpers::comparer<key_t>, helpers::allocator<std::pair<const key_t, value_t>>>;
std::map< key_t, value_t, helpers::comparer< key_t >, helpers::allocator< std::pair< const key_t, value_t > > > sorted_dictionary
Represents a collection of key/value pairs that are sorted on the key.
Definition sorted_dictionary.h:36
std::allocator< type_t > allocator
Represent an allocator alias.
Definition allocator.h:35
Header
#include <xtd/collections/sorted_dictionary
Namespace
xtd::collections::generic
Library
xtd.core
Remarks
The xtd::collections::generic::sorted_dictionary class is same as std::map.
A xtd::collections::generic::sorted_dictionary object maintains a sorted order without affecting performance as elements are inserted and deleted. Duplicate elements are ! allowed. Changing the sort values of existing items is ! supported and may lead to unexpected behavior.
Examples
The following shows how to use xtd::collections::generic::sorted_dictionary.