Boost logo

Boost :

From: Andrey Semashev (andysem_at_[hidden])
Date: 2007-01-19 16:05:23


Hello Matthias,

[snip]

>> For (b) the semantics really are
>> the same as a static_cast since the only thing changing is the
>> type, so it's
>> dimensionally safe even if it's type-dangerous. But (a) I worry
>> about. For
>> something like that I'd rather see another name for the cast since
>> it is a
>> potential hole in the unit system – something like
>> reinterpret_quantity_cast. (There's always reinterpret_cast for
>> doing things
>> that are really unsafe.)

> Is it possible to overload the system reinterpret_cast, or is it not
> really a
> library function? If it was, that might be an option, too...

It's an operator and it cannot be overloaded.

-- 
Best regards,
 Andrey                            mailto:andysem_at_[hidden]

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