Most of my projects are on GitHub. I'm currently with the Portland Trail Blazers.


The driving force behind _Generic is to provide a pseudo type-polymorphism mechanism. For example, the acos macro defined in tgmath.h could be implemented as:

#define acos(X) _Generic((X),    \
    long double complex: cacosl, \
         double complex: cacos,  \
          float complex: cacosf, \
            long double: acosl,  \
                  float: acosf,  \
                default: acos    \

Robert Gamble