On Feb 25, 2005, at 9:27 PM, Peter Elmer wrote:
> Ah, you are right, I see several instances of this in the xrootd
> src/XrdOss/XrdOssConfig.cc:#define max(a,b) (a < b ? b : a)
> src/XrdClient/XrdClientReadCache.hh:#define min(a, b) (a < b ? a : b)
> So this isn't a compiler bug, but redefinition of a keyword. We can
> them to "xrdmax" and "xrdmin". I'll do that (since I'm fixing a bunch
> other stupid things) unless somebody complains soon.
You were too quick for me. Why not just change them to std::min and
std::max and let the standard library do its work for you? The only
time this would be a problem is when the types of "a" and "b" are
different, and you probably want to catch that at compile time, anyway.
Gregory J. Sharp email: [log in to unmask]
Wilson Synchrotron Laboratory url:
Dryden Rd ph: +1 607 255 4882
Ithaca, NY 14853 fax: +1 607 255 8062