This is also on that site, but I wanted to post it here in case that site goes down.
#define max(...) macro_dispatcher(max, __VA_ARGS__)(__VA_ARGS__)
#define max1(a) a
#define max2(a,b) ((a)>(b)?(a):(b))
#define max3(a,b,c) max2(max2(a,b),c)
// ...
// to verify, run the preprocessor alone (g++ -E):
max(1,2,3);
Credit see the first post's url.
Both of these worked on Windows mingw using the command shell, I used gcc to test it in c and not g++: gcc -E filename.c