MapInitT
Description
Typed initializer for a Map(K, V) typedef. Casts the inner anonymous struct produced by MapInit to the caller’s declared type.
Parameters
| Name | Direction | Description |
|---|---|---|
m |
in | Variable whose type tag is recovered via TYPE_OF(m). |
hash_fn |
in | Hash callback for keys. |
compare_fn |
in | Key comparator. |
Success
Returns a value of type TYPE_OF(m) initialized as an empty map (length 0, no probe table, linear policy bound). No heap allocation is performed.
Failure
Function cannot fail.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Init.h:358:
))
#else
# define MapInitT(m, hash_fn, compare_fn) ((TYPE_OF(m))MapInit((hash_fn), (compare_fn)))
# define MapInitWithValueCompareT(m, hash_fn, compare_fn, value_compare_fn) \
((TYPE_OF(m))MapInitWithValueCompare((hash_fn), (compare_fn), (value_compare_fn)))
Last updated on