Post #13825 133 Apr 2, 2026, 14:30 UTC The “macro overloading” idiomИсточник: Arthur O’Dwyer Arthur O’Dwyer The “macro overloading” idiom Here’s a neat trick to create an “overloaded macro” in C, such that M(x) does one thing and M(x, y) does something else. For example, we could make a macro ARCTAN such that ARCTAN(v) calls atan(v) and ARCTAN(y,x) calls atan2(y,x). #define GET_ARCTAN_MACRO(_1…