Hacker News new | ask | show | jobs
by AtalantaDB 45 days ago
Wow) I like the idea of making __map a builtin instead of forcing users to simulate recursion through macro expansion. One thing Im curious about is how you handle expansion semantics. Consider: #define X 42 #define STR(x) #x

__map(STR, X)

Should this produce "X" (like STR(X) does), or "42" (if __map expands its arguments first)?

1 comments

__map() expands its arguments, like other function-like macros.