A type-generic interface exposes one call form while selecting behavior from its arguments’ types. In C11, function-like macros combined with _Generic can choose among type-specific functions or expressions. section 16.6
Dispatching a floating-point function
A macro can map float to fabsf, long double to fabsl, and other types to fabs, then apply the selected function pointer to X. A two-argument minimum interface follows the same pattern, using (A)+(B) to determine the arithmetic type before calling minf, min, or minl. section 16.6
Type-generic interfaces are useful when a function alone cannot provide the required flexibility:
- Select functions or values according to argument types. section 16.6
- Provide compile-time argument checking and type mapping. section 16.0
- Support interfaces whose behavior depends on the calling context or requires variable arguments. section 16.0
- Avoid macros when an inline function already supplies a fixed, type-safe interface; unlike a naive square macro, an inline function evaluates count() only once. section 16.0

