Re: static_cast in squid3

From: Robert Collins <robertc@dont-contact.us>
Date: 08 Nov 2002 21:57:30 +1100

On Fri, 2002-11-08 at 21:46, Evgeny Kotsuba wrote:
> Hi,
>
> Why use static_cast in squid3 ???
> First it makes source incompatible with C

This doesn't matter, squid3 is C++.

> second it makes more heavy
> to keep coincidence of common parts of squid2 and squid3,

The whole point of squid3 is to allow rapid, safer changes. Keeping it
the same as squid2 is not a goal. However, Henrik's merge script will
let us backport where it is possible quite easily.

> next it is
> not supported on some compilers

What compilers don't support it?

> and last it is longer then pure
> typecast.

static_cast ensures that the typecast is safe, AFAIK a C-style cast
doesn't check all the operators.

Also, note that static casts will be unneeded once we've fully converted
the code to good C++ design.

Rob

Received on Fri Nov 08 2002 - 03:57:33 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:18:38 MST