Boost logo

Boost :

From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2003-12-12 15:49:31


Daryle Walker wrote:
> On 12/8/03 7:04 AM, "Thorsten Ottosen" <nesotto_at_[hidden]> wrote:
>
> [SNIP]
>> "The Boost Numeric Conversion library is a collection of tools to
>> describe and perform conversions between values of different numeric
>> types.
>>
>> The library includes a special alternative for a subset of
>> std::numeric_limits<>, the bounds<> traits class, which provides a
>> consistent way to obtain the boundary values for the range of a
>> numeric type.
>
> This is OK. (Your example in the docs may want to have also an "int"
> example to show why "bounds" is needed.)
>
Noted, thanks.

> There are other holes in "std::numeric_limits", but those can be
> handled later.
>
:-) Or we can throw it away altoghether.

>> It also includes a set of trait classes which describes the
>> compile-time properties of a conversion from a source to a target
>> numeric type. Both arithmetic and user-defined numeric types can be
>> used."
>
> These are OK.
>
> For the tools that actually do conversions: some of the names are
> (still) in InterCaps style; maybe they should be changed to match
> the_usual_style.
>
hehe, I really dislike dashed STL-like names, but... consistency is more
important than personal perferences so....

> There is an improved "numeric_cast" that uses the new conversion
> helpers,
> but only in the default mode. Maybe there should be a variant of
> "numeric_cast" that takes a conversion helper class that has some of
> the template parameters overridden.
>
Yes, I thought this too... I just didn't want to mess to much with
numeric_cast since it was already out there.
But a new overload (or with a slightly different name) can do no harm.

>> c.. What is your evaluation of the documentation?
>
> As you said, it needs some more work. The gist of the content is
> done very well. (I should reject the submission for misspelling my
> name, but I'll be nice. -_^)
>
Oops! Sorry about that... I'll surely fix it!

>
>> e.. Did you try to use the library? With what compiler? Did you
>> have any problems?
>
> I using a G4-equipped Mac with Mac OS X 10.2.8. With the (Apple
> special)
> GCC 3.1, the test programs ran fine. With Metrowerks CodeWarrior Pro
> 8.3, I couldn't compile. The method the author used to sneak in the
> "floor", "ceil", and "log10" screws stuff up.
>
> For converter_test:
>
> //=======================================================================
> Error : ambiguous access to overloaded function
> 'std::log10(float)'
> 'std::log10(float)'
> unit_test_result.cpp line 146 tatic_cast<std::size_t>( std::log10(
> (float)std::max( num_passed, num_failed ) ) ) + 1
>
Hmmm... how weird.... the two candidates looks exactly alike to me....
Anyway, I thought I was using ADL all along.... I'll fix that.

>
> For udt_support_test, bounds_test, and traits_test: only the first
> three errors given above
>
Noted.

>> h.. Do you think the library should be accepted as a Boost library?
>> Be sure to say this explicitly so that your other comments don't
>> obscure your overall opinion.
>
> Yes.
>
Great!

Best,

Fernando Cacciola
SciSoft


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