Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost 1.54.0 Header Warnings: Shadowed Variables
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2013-11-13 11:58:11


On 12 Nov 2013 at 18:03, Tom Browder wrote:

> Ref the -Wshadow warning in particular: IMHO, the obstinate and
> continued use of a shadowed name (just because one thinks one can get
> away with it) in a well-respected library like Boost is not good for
> business nor the author's reputation.

I personally deliberately and intentionally shadow both variable and
type names in non-public namespaces where doing so significantly
eases my maintenance costs. One particular area where this can be
needed is getting some code to compile across differing levels of
native STL C++ 11 compliance where you want either Boost's or the
STL's implementation to get selected.

None of this pollutes any public namespace - I therefore see no
reason why I should be stopped from making my life easier. Bugs in my
use of shadowing are entirely my problem, not someone else's.

Niall

-- 
Currently unemployed and looking for work.
Work Portfolio: http://careers.stackoverflow.com/nialldouglas/



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net