Boost logo

Boost :

From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2003-05-15 14:47:07


Hello,

the argument of BOOST_TESTED_AT() is not evaluated until
BOOST_DETECT_OUTDATED_WORKAROUNDS is defined. While this is not such a big
problem, it hides typos.
I propose this little patch, but I don't know how well it will interact with
broken preprocessors.

Comments?

Giovanni Bajo

Executing: cvs diff -cw workaround.hpp
Index: workaround.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/detail/workaround.hpp,v
retrieving revision 1.8
diff -c -w -r1.8 workaround.hpp
*** workaround.hpp 20 Mar 2003 15:29:32 -0000 1.8
--- workaround.hpp 15 May 2003 19:38:15 -0000
***************
*** 62,68 ****
  # define BOOST_OPEN_PAREN (
  # define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
  # else
! # define BOOST_TESTED_AT(value) != 0
  # endif

  # else
--- 62,68 ----
  # define BOOST_OPEN_PAREN (
  # define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
  # else
! # define BOOST_TESTED_AT(value) != ((value) - (value))
  # endif

  # else


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk