Examples
- Basic use
- Generics
- Hash-Based Containers
- Tree-Based Containers
- basic_map.cc- Basic use of "maps".
- basic_set.cc- Basic use of "sets".
See
Mapping Semantics::Data Types as a Policy.
- basic_multimap.cc- Basic use of "multimaps".
See
Mapping Semantics::Data Types as a Policy.
- erase_if.cc- Conditionally
erasing values from a container object.
See
Motivation::Choice of Methods.
- ds_traits.cc-
Using
ds_traits to query about underlying
data-structure behaviour.
See
Data-Structure Genericity::Data-Structure Tags and Traits.
- mapping_level.cc-
Rebinding a compound associative-container to different mapping levels.
See
Mapping-Semantics::Mapping Levels.
- ms_traits.cpp-
Using ms_traits
to query about mapping semantics.
See
Mapping-Semantics::Tags and Traits.
- cc_ht_extract_key.cc-
Extracting the key from different types.
See
Hash-Based Containers.
General
-
hash_bad_find.cc-
A non-compiling example showing wrong use of finding keys in hash-based
containers.
See
Data-Structure Genericity::Find-Type and Range-Type Methods and Iterators.
Resize-Related
See
Hash-Based Containers::Resize Policies.
-
hash_initial_size.cc-
Setting the initial size of a hash-based container object.
-
hash_bad_resize.cc-
A non-compiling example showing how not to resize a hash-based container object.
-
hash_resize.cc-
Resizing the size of a hash-based container object.
- hash_illegal_resize.cc-
Showing an illegal resize of a hash-based container object.
-
hash_load_set_change.cc-
Changing the load factors of a hash-based container object.
Hash-Related
See
Hash-Based Containers::Hash Policies.
-
hash_mod.cc-
Using a modulo range-hashing function.
-
store_hash.cc-
Storing the hash value along with each key.
-
shift_mask.cc-
Writing a range-hashing functor.
- ranged_hash.cc-
Writing
a ranged-hash functor.
See
Tree-Based Containers.
Node-Invariatns
See
Tree-Based Containers::Node Invariants.
- tree_order_statistics.cc-
Using trees for order statistics.
- tree_intervals.cc- Augmenting an
ov_tree_set
to support operations on line intervals.
Split and Join
See
Tree-Based Containers::Additional Types and Methods.
- tree_join.cc- Joining
two tree-based container objects.
- tree_split.cc- Splitting
a tree-based container object.
- tree_order_statistics_join.cc- Order statistics while joining two tree-based container objects.