mirror of
https://github.com/Ed94/metadesk.git
synced 2026-07-27 18:00:03 +00:00
fixup _Generic macro usage
distinct macros failed (didn't realize). Was able to get proper setup with _Generic_L2 pattern
This commit is contained in:
@@ -179,3 +179,9 @@
|
||||
} \
|
||||
while(0);
|
||||
#endif
|
||||
|
||||
#define ct_if(expr, then, else) _Generic( \
|
||||
(&(char[1 + !!(EXPR)]){0}), \
|
||||
char (*)[2]: (THEN), \
|
||||
char (*)[1]: (ELSE) \
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user