I tried to overload a function with the C11 _Generic macro like this:
int isPrim_int (int num);
int isPrim_lint (long int num);
int isPrim_llint (long long int num);
#define isPrim(_1, ...) _Generic((_1), \
int: isPrim_int, \
long int: isPrim_lint, \
long long int: isPrim_llint)
But for some reason using isPrim() returns always 1, when using the specific three functions isPrim_int, isPrim_lint and isPrim_llint it works as intended. Any clues whats wrong with my use of the macro?
Thanks a lot!