Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid use of primitive_cat instead of cat in Wiki #5

Closed
micwypych opened this issue Apr 7, 2016 · 1 comment
Closed

Invalid use of primitive_cat instead of cat in Wiki #5

micwypych opened this issue Apr 7, 2016 · 1 comment

Comments

@micwypych
Copy link

https://github.com/pfultz2/Cloak/wiki/C-Preprocessor-tricks,-tips,-and-idioms
there is:

#define IIF(c) PRIMITIVE_CAT(IIF_, c)
#define IIF_0(t, ...) __VA_ARGS__
#define IIF_1(t, ...) t

should be:

#define IIF(c) CAT(IIF_, c)
#define IIF_0(t, ...) __VA_ARGS__
#define IIF_1(t, ...) t
@pfultz2
Copy link
Owner

pfultz2 commented Apr 7, 2016

PRIMITIVE_CAT is valid here. IIF will scan and expand c and then PRIMITIVE_CAT will concatenate the symbols.

@pfultz2 pfultz2 closed this as completed Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants