Boost logo

Boost :

Subject: Re: [boost] Old style casts and Boost style guidelines
From: Jon Biggar (jon_at_[hidden])
Date: 2008-09-14 11:27:26


Gennaro Prota wrote:
> Jon Biggar wrote:
> Speaking in general --not about the specific
> usages spotted here by gcc, which I haven't examined-- there are some
> cases where C-style casts can't do any harm,

Other than perhaps to encouraging code written in a modern-style. :)

> and some where they have
> been used because of compiler deficiencies (at least one of the latter
> is in bitset_test.hpp, though it's adequately commented).

Yes, I had wondered about compiler deficiencies. I'm a bit surprised
that boost doesn't already have "broken compiler" macros for each of the
new-style casts anyway.

> For the rest,
> I think you're seeing the hair and not the beam, so to speak.

It's hard to find the beam in my own code when I need to sift through
all that hair from the boost headers. :)

Seriously, the problem with warnings in headers is that you see them
over and over and over and over...all in one compile.

-- 
Jon Biggar
jon_at_[hidden]
jon_at_[hidden]
jonbiggar_at_[hidden]

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