|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-05-15 18:07:01
"Giovanni Bajo" <giovannibajo_at_[hidden]> writes:
> 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?
Looks like a good idea to me. Let's check it in and see what breaks.
>
> 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
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk