Boost logo

Boost :

From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2003-11-16 20:20:14

[Stephan T. Lavavej]
> #pragma GCC system_header

[David Abrahams]
> Ow. That's quite a large hammer.

That's why just fixing the shadowing problems is preferable.

Perhaps the ability to turn such a pragma on would be nice; compile with
-DBOOST_HEADERS_TREATED_AS_SYSTEM_HEADERS or something to turn off all
warnings coming from Boost headers.

Obviously you wouldn't want to define that while working on Boost itself.
> My question was to point out that it may be difficult to reach such a
> consensus.


> I'm still not comfortable with -Wshadow:
> Maybe the problem is limited because we don't have many globals; I'm
> not sure.

So far I haven't observed any instances of such shadowing, though I'm far
from using all of Boost.

I would argue that globally visible things should have names which are hard
to clash with; naming a global "first" or "size" would be bad.

> If trying to avoid -Wshadow reports is too much of a pain for Boost
> developers, it will hurt everyone. Maybe it won't be too painful,
> though.

I'm interested in what other developers think.

For the time being, I'm only concerned about these specific warnings in
Regex. Having all of Boost's headers be free of shadowing would be a nice
goal for the future. As for shadowing in separately compiled source (I
imagine that there's a lot more in Regex), I don't care about that at all as
a user.

Stephan T. Lavavej

Boost list run by bdawes at, gregod at, cpdaniel at, john at