
Jonathan Wakely wrote:
On Sat, Feb 12, 2005 at 10:29:57PM +0000, Jonathan Wakely wrote:
Should BOOST_TESTED_AT be defined like this?
# define BOOST_TESTED_AT(value) <= (value)
Am I being stupid?
Yes. Since the intention of BOOST_TESTED_AT is to pass all versions, but allow the check to be located later and the bug checked, the current definition is right, except for the fact it fails when used with 0.
Your comments made me realize that I misdescribed what I was trying to do. I want the workaround to apply to all versions of GCC by default, but allow the test to disabled for future versions. Otherwise I wouldn't need to use BOOST_WORKAROUND at all. Furthermore, I see now that BOOST_WORKAROUND will never work with a value of zero, since it is defined as ((symbol != 0) && (...)) I guess I could do: #if defined(__GNUC__) && !defined(BOOST_INTEL) # define BOOST_IOSTREAMS_GCC(__GNUC__ * 100 + __GNUC_MINOR__) #endif #if BOOST_WORKAROUND(BOOST_IOSTREAMS_GCC, <= 400) .... #endif Jonathan