A _Generic expression selects one expression by the type of its controlling expression. Its listed type expressions must be mutually incompatible, so the compiler can choose exactly one match. TAKEAWAY: incompatible types are C types that cannot denote the same compatible type for this construct. section 16.6
Selecting a type-specific function
The fabs macro associates float with fabsf and long double with fabsl, leaving fabs as the default. These associations illustrate distinct type cases in a type-generic interface.
Keep these related constraints in view:
- Require an unambiguous compile-time choice among the type expressions. section 16.6
- Reject a pointer to a variable-length array as a _Generic type expression. section 16.6
- Keep every choice expression valid, including alternatives that are not selected. section 16.6
