Disadvantages of _Generic
The major disadvantages of _Generic are as follows:
- The major disadvantage of _Generic is its usage in macros as they are vulnerable to errors.
- It is difficult to understand and debug in case of error due to complex syntax and limited view of expanded code.
_Generics Keyword in C
The _Generic keyword in C is used to implement a generic code that can execute statements based on the type of arguments provided. It can be implemented with C macros to imitate function overloading. The _Generic keyword was first introduced in C11 Standard.