[gambit-list] C++ defines in GUIDE

Adam Langley alangley at gmail.com
Mon Aug 22 14:01:52 EDT 2005


>From 4b14, lib/guide/guide.h:

#define min(x,y) (((x)<(y))?(x):(y))
#define max(x,y) (((x)>(y))?(x):(y))

It's illegal to define max and min in this way in C++. Modern gcc's
fail to compile this. With C++ std::min and std::max can be used.


AGL

-- 
Adam Langley                                      agl at imperialviolet.org
http://www.imperialviolet.org                       (+44) (0)7906 332512
PGP: 9113   256A   CC0F   71A6   4C84   5087   CDA5   52DF   2CB6   3D60



More information about the Gambit-list mailing list