Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

PRE00-EX4: Macros can be used to implement type-generic functions that cannot be implemented in the C language without the aid of a mechanism such as C++ templates.

An example of the use of functionlike function-like macros to create type-generic functions is shown in MEM02-C. Immediately cast the result of a memory allocation function call into a pointer to the allocated type.

...