jack: (Default)
jack ([personal profile] jack) wrote in [personal profile] simont 2019-03-09 11:26 am (UTC)

Everybody stand back, I know inadvisable preprocessor tricks!

#define max(a,b) (a>b?a:b)

Works, right? If both arguments are l-values, you can assign to it. If either isn't, you can't. Obviously with all the usual reasons why you don't use a define for that. But it doesn't work with a function?

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting