template<class KeyType, class MappedType, class Hasher, template< class > class ExtractHash, class... MappedTypes>
class jmmcg::LIBJMMCG_VER_NAMESPACE::unordered_tuple< KeyType, MappedType, Hasher, ExtractHash, MappedTypes >
A unordered container for a disparate list of types for which the keys form a perfect hash, computable at compile-time.
This class performs zero memory allocations. All of the data is maintained on the stack at the cost of some additional space. There is padding added between each instance of a MappedType to ensure that those instances avoid false sharing in any cache level.
Definition at line 44 of file unordered_tuple.hpp.
template<class KeyType , class MappedType , class Hasher , template< class > class ExtractHash, class ... MappedTypes>
template<class MappedCtorArg , class... MappedCtorArgs, class >
If the construction of any instance of a mapped_type fails, then any already constructed instance of a mapped_type will be correctly deleted, and that failing exception re-thrown. Each of the MappedTypes is either default constructed or constructed with exactly, successively, one of the {arg, args...} parameters passed to this ctor. Thus there must be the same number of MappedTypes as the number of ctor arguments passed in. i.e. sizeof...(MappedTypes)==sizeof...(args)+1.
Definition at line 39 of file unordered_tuple_impl.hpp.
template<class KeyType , class MappedType , class Hasher , template< class > class ExtractHash, class ... MappedTypes>
Find the instance of mapped_type associated with the instance of key_type.
Algorithmic complexity: O(1) Note that great effort has been made to ensure that this is as fast as possible.
- Parameters
-
key | The instance of key_type associated with a mapped_type. |
- Returns
- A reference to the associated instance of mapped_type.
Definition at line 61 of file unordered_tuple_impl.hpp.
template<class KeyType , class MappedType , class Hasher , template< class > class ExtractHash, class ... MappedTypes>
Find the instance of mapped_type associated with the instance of key_type.
Algorithmic complexity: O(1) Note that great effort has been made to ensure that this is as fast as possible.
- Parameters
-
key | The instance of key_type associated with a mapped_type. |
- Returns
- A reference to the associated instance of mapped_type.
Definition at line 69 of file unordered_tuple_impl.hpp.