[Boost-bugs] [Boost C++ Libraries] #2851: BOOST_FOREACH problem with Intel compiler

Subject: [Boost-bugs] [Boost C++ Libraries] #2851: BOOST_FOREACH problem with Intel compiler
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-03-12 16:47:52

#2851: BOOST_FOREACH problem with Intel compiler
 Reporter: s.goehler_at_[hidden] | Owner: stefan
     Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: foreach
  Version: Boost 1.38.0 | Severity: Regression
 Keywords: |

 when compiling one of our applications with the Intel Compiler 11.0.072, I
 experienced a problem with local non-pointer variables. There are actually
 two workarounds to this:
 - change line 53 of foreach.hpp from BOOST_WORKAROUND(BOOST_INTEL_WIN, <=

 - make in the example file the vector "ItemContainer mCollection" a
 pointer: "ItemContainer *mCollection;" and adress the object itself in the

 Obviously, a workaround is no fix; so here the compiler output:

 Compiler output:
 1>Compiling with Intel(R) C++ 11.0.072 [IA-32]... (Intel C++ Environment)
 1>.\boost_bug.cpp(21): error: operand types are incompatible
 ("boost::foreach_detail_::rvalue_probe<const TestClass::ItemContainer>"
 and "const TestClass::ItemContainer")
 1> BOOST_FOREACH (Item* n, mCollection)
 1> ^

 Please let me know if you can re-create the problem and if you can fix it.

 Stefan Göhler

Ticket URL: <https://svn.boost.org/trac/boost/ticket/2851>
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:49:59 UTC