BOOST_CHECK_PREDICATE vs BOOST_WARN_PREDICATE
The documentation page for the PREDICATE testing macros gives quite different syntax for the WARN vs CHECK methods: BOOST_WARN_PREDICATE( moo, (12)(i)(j) ); BOOST_CHECK_PREDICATE( std::not_equal_to<int>(), 2, (i,17) ); Since BOOST_WARN_PREDICATE and BOOST_CHECK_PREDICATE are only slight variants of one another, I'm confused as to why the syntax differs so much. Can anyone shed some light on this for me? Thanks, Alex
"Alex Flint" <alex.flint@gmail.com> wrote in message
The documentation page for the PREDICATE testing macros gives quite different syntax for the WARN vs CHECK methods:
BOOST_WARN_PREDICATE( moo, (12)(i)(j) );
This one is correct
BOOST_CHECK_PREDICATE( std::not_equal_to<int>(), 2, (i,17) );
This is an error in an example Gennadiy
Strange... the second works for me but the first one does not! How confusing! On 3/7/07, Gennadiy Rozental <gennadiy.rozental@thomson.com> wrote:
"Alex Flint" <alex.flint@gmail.com> wrote in message
The documentation page for the PREDICATE testing macros gives quite different syntax for the WARN vs CHECK methods:
BOOST_WARN_PREDICATE( moo, (12)(i)(j) );
This one is correct
BOOST_CHECK_PREDICATE( std::not_equal_to<int>(), 2, (i,17) );
This is an error in an example
Gennadiy
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
It depends which version of boost you are using. Original version of the tool indeed used second interface. But it was changed almost immediately to first one that I consider more elegant and convenient. Genandiy "Alex Flint" <alex.flint@gmail.com> wrote in message news:d77f684a0703070012m180ce1cewbd2e6d25a247787c@mail.gmail.com... Strange... the second works for me but the first one does not! How confusing! On 3/7/07, Gennadiy Rozental < gennadiy.rozental@thomson.com> wrote: "Alex Flint" < alex.flint@gmail.com> wrote in message > The documentation page for the PREDICATE testing macros gives > quite different syntax for the WARN vs CHECK methods: > BOOST_WARN_PREDICATE( moo, (12)(i)(j) ); This one is correct > BOOST_CHECK_PREDICATE( std::not_equal_to<int>(), 2, (i,17) ); This is an error in an example Gennadiy _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users ------------------------------------------------------------------------------ _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Alex Flint
-
Gennadiy Rozental