From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Murilo Adriano Vasconcelos Sent: Wednesday, July 21, 2010 10:49 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] About naming of integer log in base 2
and maybe you need to document some examples of using policies that don't bother to check or at least do so quietly (your > original idea), just quietly return -1, produce a message and return -1, or message and then throw an exception.
I should have said that there is an example at \boost_1_43_0\libs\math\example\error_policy_example.cpp
and you will also want to provide some Boost.Test style tests too - something like
BOOST_CHECK_EQUAL(ilog2(1), 1); // Some plain values...
...
BOOST_CHECK_EQUAL(ilog2(FFFFFFFF), 1); // Some cases that might cause trouble.
BOOST_CHECK_EQUAL(ilog2(std::numeric_limits