A map implementation backed by a sorted SmallVector. Key‐value pairs are stored in contiguous memory ordered by KeyCompare.

Synopsis

Declared in <llvm/ADT/SortedVectorMap.h>

template<
    typename KeyT,
    typename ValueT,
    unsigned int N = 0,
    typename KeyCompare = std::less<KeyT>>
class SortedVectorMap;

Type Aliases

Name

Description

VectorType

Contiguous storage type for sorted key/value pairs.

const_iterator

Const iterator over key/value pairs in sorted key order.

const_reverse_iterator

Const reverse iterator over key/value pairs.

iterator

Mutable iterator over key/value pairs in sorted key order.

key_type

Key type stored in the map.

mapped_type

Mapped value type.

reverse_iterator

Mutable reverse iterator over key/value pairs.

size_type

Unsigned size type of the underlying vector.

value_type

Key/value pair type stored in the underlying vector.

Member Functions

Name

Description

SortedVectorMap [constructor]

Construct an empty map.

begin

begin overloads

capacity

Return the capacity of the underlying vector.

cbegin

Return a const iterator to the first key/value pair.

cend

Return a const iterator past the last key/value pair.

crbegin

Return a const reverse iterator to the last key/value pair.

crend

Return a const reverse iterator before the first key/value pair.

empty

Return true if the map contains no entries.

end

end overloads

erase

Erase the element at Pos and return an iterator to the following element.

find

Find Key, or return end() if it is absent.

insert

insert overloads

operator[]

Subscript operators

rbegin

rbegin overloads

rend

rend overloads

reserve

Reserve capacity for at least Cap key/value pairs.

size

Return the number of key/value pairs.

try_emplace

try_emplace overloads

operator==

Return true if this map and Other have identical contents.

Created with MrDocs