Similar to P99_GENERIC but the choice is not done according to the type of the expression UI but for its unsigned value.
|UI||must be a compile time integer expression that is cast to |
size_t and that must not be of value
a = P99_GENERIC_SIZE(sizeof(a),
In this example one of the functions
func8 is chosen according to the size of
a. This function is then called with the address of
a. In case that the size of
a is not appropriate a function
func_fallback is used.
- The range of allowed values for UI is platform dependent. The only known fixed guarantee is
UINT16_MAX, but the result of a
sizeof operator should always work.
- See also:
Definition at line 496 of file p99_generic.h.