|
|
|
|
|
by gibibit
454 days ago
|
|
It is a clever trick. Very useful in C also, maybe more than in C++. It can be overused, though. Kind of works like Rust declarative macros (`macro_rules!`) in that it is often used to repeat and expand something common across an axis of things that vary. It's funny that the simple name X Macros has stuck and is a de facto standard. E.g. https://en.wikipedia.org/wiki/X_macro suggests they date to the 1960s. |
|