Library of Assembled Shared Sources
lass::stde::vector_map< Key, T, Compare, Allocator > Class Template Reference

a map-like container built on a sorted vector (write-rarely, read-many) More...

#include <vector_map.h>

Inheritance diagram for lass::stde::vector_map< Key, T, Compare, Allocator >:

Public Types

typedef std::pair< Key, T > value_type
 

Detailed Description

template<typename Key, typename T, typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<Key, T> >>
class lass::stde::vector_map< Key, T, Compare, Allocator >

a map-like container built on a sorted vector (write-rarely, read-many)

Author
Bram de Greve [Bramz]

Definition at line 65 of file vector_map.h.

Member Typedef Documentation

◆ value_type

template<typename Key, typename T, typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<Key, T> >>
typedef std::pair<Key, T> lass::stde::vector_map< Key, T, Compare, Allocator >::value_type
Warning
this actually should be a std::pair<const Key, T> as required by associative containers. But if we do, the underlying std::vector that stores the elements will bork on it as it also requires value_type to be copy assignable. Until we have a solution that works for both, we'll open the security hole by have a mutable key. It of course goes without saying that you should never ever mutate the key of an element stored in a vector_map!

Definition at line 78 of file vector_map.h.


The documentation for this class was generated from the following files: