Boost logo

Boost :

Subject: Re: [boost] [numeric_cast] request for boost::numeric_downcast
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2008-11-14 09:02:54


David Abrahams skrev:
> on Tue Nov 11 2008, Thorsten Ottosen <thorsten.ottosen-AT-dezide.com> wrote:
>
>>> Not to me. In what sense is this proposed cast "down?"
>> Well, as you say, its narrowing.
>>
>> The naming applied to polymorphic_cast and polymorphic_downcast is not
>> perfect either, since both can be used to "casting down".
>
> That's like saying a knife is badly named because it can be used for
> "slicing carrots."

Do you disagree with my proposal that we should have some consistent way
  of naming a cast that does a debug check, but otherwise is unchecked?

I suggested

     boost::numeric_debug_cast
     boost::polymorphic_debug_cast
     boost::any_debug_cast

but perhaps

     boost::numeric_static_cast
     boost::polymorphic_static_cast
     boost::any_static_cast

which reads nice, but the names are getting awfully long.

-Thorsten


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