[Boost-bugs] [Boost C++ Libraries] #7531: [container] shadowing warnings under gcc

Subject: [Boost-bugs] [Boost C++ Libraries] #7531: [container] shadowing warnings under gcc
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-18 17:22:51

#7531: [container] shadowing warnings under gcc
 Reporter: jeffrey.hellrung | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
  Version: Boost 1.51.0 | Severity: Problem
 Keywords: |
 The following

 #include <boost/container/vector.hpp>

 int main(int argc, char* argv[]) { return 0; }

 compiled with

 g++ -I/path/to/boost -Wshadow main.cpp


 /path/to/boost/boost/container/vector.hpp: In member function ‘void
 boost::container::vector<T, A>::priv_assign_aux(FwdIt, FwdIt,
 /path/to/boost/boost/container/vector.hpp:2066: warning: declaration of
 â€˜end’ shadows a member of 'this'

 Similar warnings appear when including flat_set and flat_map (and not
 sure, perhaps other containers as well). Seems most if not all such
 warnings are easily avoided by using a different name for the relevant
 local variables. This one of the warnings turned on by one of the software
 groups at Sandia, where warnings are treated as errors, hence this
 precludes the use of Boost.Container within this software. Which is very
 sad for me :(

 If you want, Ion, I can make the necessary changes in trunk tonight (U.S.
 time) and soon after merge to release in time to get this into 1.52.0.

 Also, I don't think it matters, but this is on gcc 4.1.2.

Ticket URL: <https://svn.boost.org/trac/boost/ticket/7531>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC