Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2001-09-27 00:22:51


on 9/27/01 3:21 AM, Eric Ford at eford_at_[hidden] wrote:

> Obviously useful and worth including.
>
> I don't like the choice of the lb in static_lb and it's friends. I
> think static_log2 would be a better choice. Mainly because it's more
> clear, but also I beleive it's parralel to some standard's function,
> log2.
>
> Also, I'd prefer replacing uint_t and int_t with uint_bits_t and
> int_bits_t. Again, it's definitely more clear and more parallel with
> int_min_value_t, int_max_value_t, and uint_value_t.

The <boost/integer.hpp> header is one I added items, and "uint_t" and
"int_t" are from the previous version, so I can't just change that stuff.

> Probably showing my ignorance, but any reason why long long and
> unsigned long long was left out? If it's some standards issue which
> could change, is it wise to have the int_least_helper use numbers that
> don't allow room for adding bigger types? If int_least_helper is
> supposed to be subject to change, then should it be in a "detail"
> namespace?

The dual-long types aren't in the standard, so there's no guarantee that
they are available for use. Also, the resulting types are used in
value-based template parameters (see the CRC library), and some compilers
that have the dual-long types don't allow them as compile-time constants,
making them useless for value-based template parameter types.

> The only substantive suggestion... If I wanted to tell integer.hpp
> that I have one or more "big_int" types that can hold larger numbers,
> I beleive I'd have to replace code a fair bit of code. It might be
> nice to allow integer.hpp to be used with additional types provided by
> the user. I haven't worked out the details, but I wonder if a
> linked-list or tuple template parameter (with default template
> parameter provided to function as is) could allow for this.

You have to find the original designers, but I think <boost/integer.hpp> is
only meant for the built-in integer types.

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com

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