|
| set () |
|
| set (const allocator_type &alloc) |
|
| set (const key_compare &lessFunc, const allocator_type &alloc=allocator_type()) |
|
template<typename Iterator > |
| set (Iterator first, Iterator last, const allocator_type &alloc=allocator_type()) |
|
template<typename Iterator > |
| set (Iterator first, Iterator last, const key_compare &lessFunc, const allocator_type &alloc=allocator_type()) |
|
| set (std::initializer_list< value_type > values, const allocator_type &alloc=allocator_type()) |
|
| set (std::initializer_list< value_type > values, const key_compare &lessFunc, const allocator_type &alloc=allocator_type()) |
|
| set (set &&right) noexcept |
|
| set (set &&right, const momo::internal::Identity< allocator_type > &alloc) noexcept(std::is_empty< allocator_type >::value) |
|
| set (const set &right) |
|
| set (const set &right, const momo::internal::Identity< allocator_type > &alloc) |
|
| ~set ()=default |
|
set & | operator= (set &&right) noexcept(std::is_empty< allocator_type >::value||std::allocator_traits< allocator_type >::propagate_on_container_move_assignment::value) |
|
set & | operator= (const set &right) |
|
set & | operator= (std::initializer_list< value_type > values) |
|
void | swap (set &right) noexcept |
|
const nested_container_type & | get_nested_container () const noexcept |
|
nested_container_type & | get_nested_container () noexcept |
|
const_iterator | begin () const noexcept |
|
const_iterator | end () const noexcept |
|
const_reverse_iterator | rbegin () const noexcept |
|
const_reverse_iterator | rend () const noexcept |
|
const_iterator | cbegin () const noexcept |
|
const_iterator | cend () const noexcept |
|
const_reverse_iterator | crbegin () const noexcept |
|
const_reverse_iterator | crend () const noexcept |
|
key_compare | key_comp () const |
|
value_compare | value_comp () const |
|
allocator_type | get_allocator () const noexcept |
|
size_type | max_size () const noexcept |
|
size_type | size () const noexcept |
|
MOMO_NODISCARD bool | empty () const noexcept |
|
void | clear () noexcept |
|
const_iterator | find (const key_type &key) const |
|
template<typename KeyArg > |
momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, const_iterator > | find (const KeyArg &key) const |
|
size_type | count (const key_type &key) const |
|
template<typename KeyArg > |
momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, size_type > | count (const KeyArg &key) const |
|
bool | contains (const key_type &key) const |
|
template<typename KeyArg > |
momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, bool > | contains (const KeyArg &key) const |
|
const_iterator | lower_bound (const key_type &key) const |
|
template<typename KeyArg > |
momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, const_iterator > | lower_bound (const KeyArg &key) const |
|
const_iterator | upper_bound (const key_type &key) const |
|
template<typename KeyArg > |
momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, const_iterator > | upper_bound (const KeyArg &key) const |
|
std::pair< const_iterator, const_iterator > | equal_range (const key_type &key) const |
|
template<typename KeyArg > |
momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, std::pair< const_iterator, const_iterator > > | equal_range (const KeyArg &key) const |
|
std::pair< iterator, bool > | insert (value_type &&value) |
|
iterator | insert (const_iterator hint, value_type &&value) |
|
std::pair< iterator, bool > | insert (const value_type &value) |
|
iterator | insert (const_iterator hint, const value_type &value) |
|
insert_return_type | insert (node_type &&node) |
|
iterator | insert (const_iterator hint, node_type &&node) |
|
template<typename Iterator > |
void | insert (Iterator first, Iterator last) |
|
void | insert (std::initializer_list< value_type > values) |
|
template<typename... ValueArgs> |
std::pair< iterator, bool > | emplace (ValueArgs &&... valueArgs) |
|
template<typename ValueArg > |
momo::internal::EnableIf< std::is_same< key_type, typename std::decay< ValueArg >::type >::value, std::pair< iterator, bool > > | emplace (ValueArg &&valueArg) |
|
template<typename... ValueArgs> |
iterator | emplace_hint (const_iterator hint, ValueArgs &&... valueArgs) |
|
template<typename ValueArg > |
momo::internal::EnableIf< std::is_same< key_type, typename std::decay< ValueArg >::type >::value, iterator > | emplace_hint (const_iterator hint, ValueArg &&valueArg) |
|
iterator | erase (const_iterator where) |
|
iterator | erase (const_iterator first, const_iterator last) |
|
size_type | erase (const key_type &key) |
|
node_type | extract (const_iterator where) |
|
node_type | extract (const key_type &key) |
|
template<typename Set > |
void | merge (Set &&set) |
|
bool | operator== (const set &right) const |
|
bool | operator!= (const set &right) const |
|
bool | operator< (const set &right) const |
|
bool | operator> (const set &right) const |
|
bool | operator<= (const set &right) const |
|
bool | operator>= (const set &right) const |
|
template<typename TKey, typename TLessFunc = std::less<TKey>, typename TAllocator = std::allocator<TKey>, typename TTreeSet = TreeSet<TKey, TreeTraitsStd<TKey, TLessFunc>, MemManagerStd<TAllocator>>>
class momo::stdish::set< TKey, TLessFunc, TAllocator, TTreeSet >
momo::stdish::set
is similar to std::set
, but much more efficient in memory usage. The implementation is based on a B-tree.
Deviations from standard class:
- Container items must be movable (preferably without exceptions) or copyable, similar to items of
std::vector
.
- After each addition or removal of the item all iterators and references to items become invalid and should not be used.
- Functions
begin
, cbegin
, rend
and crend
have logarithmic complexity.
- If
ObjectManager<key_type>::isNothrowAnywayAssignable
is false, functions erase
can throw exceptions.
- Functions
merge
, extract
and insert(node_type&&)
move items.
It is allowed to pass to functions insert
and emplace
references to items within the container.
Function merge
can work fast, if container types are same and each key from one container is less than each key from other container.