Subject: [Boost-bugs] [Boost C++ Libraries] #12715: nested BOOST_FOREACH: MSVC 14.0 Update 3 warning issued
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-12-28 09:16:50
#12715: nested BOOST_FOREACH: MSVC 14.0 Update 3 warning issued
------------------------------+--------------------------
Reporter: timo.euler@⦠| Owner: eric_niebler
Type: Bugs | Status: new
Milestone: To Be Determined | Component: foreach
Version: Boost 1.61.0 | Severity: Problem
Keywords: |
------------------------------+--------------------------
Nested usage of BOOST_FOREACH issues the warnings:
* warning C4456: declaration of '_foreach_col' hides previous local
declaration
* warning C4456: declaration of '_foreach_cur' hides previous local
declaration
* warning C4456: declaration of '_foreach_end' hides previous local
declaration
* warning C4456: declaration of '_foreach_continue' hides previous local
declaration
Example code:
{{{
#include <boost/foreach.hpp>
int main() {
std::vector<int> iv(10);
BOOST_FOREACH(int &i, iv) {
std::vector<int> iv2(10);
BOOST_FOREACH(int &i2, iv2) {
i2 = 2;
}
i = 1;
}
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12715> 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:20 UTC