Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-07-22 12:32:15


AMDG

Mathias Gaunard wrote:
>> and if I see a failure talking about int
>> when I want a null pointer, my first instinct would be to assume it's
>> an overload or deduction error, and just cast it, at which point it
>> will compile.
>>
>
> If you cast, you're dropping type safety, so you're on your own.
> A code that performs casting, outside of low-level coding or a few
> idioms like CRTCP, is a bad thing.
>

??

I don't see how
int* ip = 0;
is less dangerous than
int* ip = static_cast<int*>(0);

The latter is only making what the compiler already does implicitly,
explicit.

In Christ,
Steven Watanabe


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