Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
kcenon::common::concepts::MappingContainer Concept Reference

A container that maps keys to values. More...

#include <container.h>

Concept definition

template<typename T>
typename T::mapped_type;
}
A container that provides key-based access.
Definition container.h:94
A container that maps keys to values.
Definition container.h:117

Detailed Description

A container that maps keys to values.

Mapping containers provide key-value pair storage with indexed access.

Example usage:

template<MappingContainer C>
auto get_or_default(C& container, typename C::key_type key,
typename C::mapped_type default_val) {
auto it = container.find(key);
return it != container.end() ? it->second : default_val;
}

Definition at line 117 of file container.h.