Boost logo

Boost Users :

Subject: Re: [Boost-users] About naming of integer log in base 2
From: Murilo Adriano Vasconcelos (muriloufg_at_[hidden])
Date: 2010-08-15 12:32:12


Hi, thank you feedback and sorry by the delay.

>
> I have added some tests:
>
>
> http://svn.boost.org/svn/boost/sandbox/SOC/2010/bits_and_ints/libs/integer/test/ilog2_test.cpp
>
>
>
> A good start (though I am not clear what using the macro ILOG2_TEST really
> buys you. It will be less familiar to Boost users. It isn’t as if it saves
> you much typing?
>
>
>
> I haven’t looked at the coverage of difficult cases but it’s on the right
> track. Other tests can be added as you (or worse, other people) find bugs
> (features) ;-)
>
>
>
> You might like to indicate what feature is being tested as a comment –
> unless it’s obvious.
>
>
>
> And examples:
> http://svn.boost.org/svn/boost/sandbox/SOC/2010/bits_and_ints/libs/integer/example/ilog2_policy_test.cpp
>
> I’d avoid using BOOST_TEST in examples. The policies example isn’t quite
> the template that users can copy and paste to get them started quickly.
> (And policies appear to be a bit scary – until you realise that most of time
> you can just ignore them – until you need a better error message etc. So
> the example would better show at least two cases – err silently and return
> -1 or whatever, and err with some informative output. ).
>
>
>
> (It took a real whizz like John Maddock to devise and apply policies. My
> contribution was to complain that you couldn’t do some things that
> reasonable users would need to!).
>
>
>
> I also think it is helpful to include the output from the example as a
> comment. I think it often fits nicely on the end of the same line as the
> cout << .... (Saves moving ones eye down to notes at the end (or worse
> running the example to find out!). Of course if the output is long you will
> need another line, or it will fit better at the end.
>
>
>
> That can be found in the docs:
>
>
> http://svn.boost.org/svn/boost/sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/bits_and_ints.html#boost_integer.bits_and_ints.integer_logarithm_base_2__ilog2_function__
>
> Looking very smart J
>
>
>
>
> Have fun!
>
>
>
>
>
> I am having, thank you :)
>
>
>
> J
>
>
>
> Keep up the good work!
>
>
>
> (I hope some people will start to use this collection ‘in anger’ soon?)
>
>
>
> PS I noted typos for ‘wich’ in more than one place.
>
>
>
> and legth in
>
>
>
> Not found a string of consecutive ones with legth at least 20
>
>
>
> and lots of “it’s” that should be “its”
>
>
>
> Only use “it’s” if short for “it is” !!
>
>
> ---
> Paul A. Bristow
> Prizet Farmhouse
> Kendal, UK LA8 8AB
> +44 1539 561830, mobile +44 7714330204
> pbristow_at_[hidden]
>
>
Changed the example:
http://svn.boost.org/svn/boost/sandbox/SOC/2010/bits_and_ints/libs/integer/example/ilog2_policy_example.cpp

, fixed the typos in docs and added the output comments.

Thank you by the alerts!

Best,

-- 
Murilo Adriano Vasconcelos
http://murilo.wordpress.com


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net