From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-12-08 05:13:26
In message <015901c06082$e682a330$0500a8c0_at_[hidden]>, David
Abrahams <abrahams_at_[hidden]> writes
>From: "Kevlin Henney" <kevlin_at_[hidden]>
>> Yes, this seems good. The cast form could wrap around this, and make use
>> of the conversion result to create a more meaningful exception. In the
>> dim and distant past a version of numeric_cast did report more specific
>> errors through different exceptions.
>Very dim and distant (if at all). I don't remember any such thing.
Pre-Boost, c. 1996.
>> It would be nice to have a
>> consistent scheme for this, and I think this is it.
>> This suggests that perhaps we should either rebrand the cast library the
>> conversions library, with cast-like functions simply being one of the
>> offerings, or break out the numeric stuff into a separate header to let
>> it grow a little.
>I think the latter. A colleague of mine just got finished a substantial
>STLport patch which eliminates compiler warnings. He wrote a number of
>helper functions like absolute_value(), is_negative(), etc., which used the
>value of numeric_limits<T>::is_signed to avoid such things as unary negation
>of unsigned types and unsigned comparisons with 0. These sorts of things
>probably ought to be in boost.
Yes, these are the kinds of things that would sit well in a cohesive
Kevlin Henney phone: +44 117 942 2990
Curbralan Limited mobile: +44 7801 073 508
mailto:kevlin_at_[hidden] fax: +44 870 052 2289
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk